Skip to content

Instantly share code, notes, and snippets.

View antoniocosentino's full-sized avatar
:octocat:
Less is more. Nothing is better.

Antonio Cosentino antoniocosentino

:octocat:
Less is more. Nothing is better.
View GitHub Profile
$ yum install -y plesk-php73-devel gcc libssh2-devel
$ yum -y install php-devel
$ wget https://pecl.php.net/get/ssh2
$ mv ssh2 ssh2-1.2.tgz
$ /opt/plesk/php/7.3/bin/pecl install ssh2-1.2.tgz
$ echo "extension=ssh2.so" > /opt/plesk/php/7.3/etc/php.d/ssh2.ini
$ plesk bin php_handler --reread
$ service plesk-php73-fpm restart
@koshatul
koshatul / README.md
Last active July 10, 2024 09:25
use Apple Keychain to store GPG Passphrases

gpg-agent setup

Need to setup gpg-agent first, on OSX I use keychain (it also does ssh-agent)

$ brew info keychain
keychain: stable 2.8.5
User-friendly front-end to ssh-agent(1)
https://www.funtoo.org/Keychain
/usr/local/Cellar/keychain/2.8.5 (7 files, 108.5KB) *
@electerious
electerious / absoluteToRelativePath.js
Created November 4, 2018 12:50
Converts absolute SVG coordinates to relative ones in order to create a responsive SVG mask that can be applied using CSS clip-path
"M78,0 L78.8918331,0.216238031 C80.7796201,0.673959707 82.3332983,2.08608489 83.0043945,3.9000001 C83.0192652,3.94019419 83.0330484,3.98600042 83.0457442,4.03741878 L83.0390876,7.96097867 C83.0390545,20.7025492 93.3365052,31 106.039054,31 L268.960946,31 C281.663495,31 291.960946,20.7025492 291.960946,8 C291.960946,7.99147462 291.95879,6.71458263 291.954479,4.16932405 C291.954323,4.07746778 291.970341,3.98630146 292.001801,3.9000001 C292.667785,2.07301174 294.211271,0.676168263 296.108167,0.216238031 L297,0 L335,0 C357.09139,-4.05812251e-15 375,17.90861 375,40 L375,772 C375,794.09139 357.09139,812 335,812 L40,812 C17.90861,812 2.705415e-15,794.09139 0,772 L0,40 C-2.705415e-15,17.90861 17.90861,4.05812251e-15 40,0 L78,0 Z"
.split(' ')
.reduce((acc, entry) => {
// Remove the first character from a string
const removeChars = (str = '') => str.replace(/^[A-Z]/g,'')
// Divide a value with the current divider
const divide = (dividers) => (value, index) => value / dividers[index]
@michaelneu
michaelneu / Dockerfile
Last active October 17, 2022 05:37
docker-compose configuration for PHP with NGINX and MySQL, including sendmail, MailDev and phpmyadmin
# see https://github.com/cmaessen/docker-php-sendmail for more information
FROM php:5-fpm
RUN apt-get update && apt-get install -q -y ssmtp mailutils && rm -rf /var/lib/apt/lists/*
RUN docker-php-ext-install mysql mysqli sysvsem
RUN pecl install xdebug-2.5.5 \
&& echo "zend_extension=$(find /usr/local/lib/php/extensions/ -name xdebug.so)" > /usr/local/etc/php/conf.d/xdebug.ini \
@hofmannsven
hofmannsven / README.md
Last active July 16, 2024 01:30
Git CLI Cheatsheet
@irazasyed
irazasyed / Install Composer using MAMP's PHP.md
Last active April 2, 2024 18:45
Instructions on how to change preinstalled Mac OS X PHP to MAMP's PHP Installation and then install Composer Package Management

Change default Mac OS X PHP to MAMP's PHP Installation and Install Composer Package Management


Instructions to Change PHP Installation


First, Lets find out what version of PHP we're running (To find out if it's the default version).

To do that, Within the terminal, Fire this command:

which php

@stephenhardy
stephenhardy / git-clearHistory
Created April 26, 2013 22:14
Steps to clear out the history of a git/github repository
-- Remove the history from
rm -rf .git
-- recreate the repos from the current content only
git init
git add .
git commit -m "Initial commit"
-- push to the github remote repos ensuring you overwrite history
git remote add origin git@github.com:<YOUR ACCOUNT>/<YOUR REPOS>.git