| gitflow | git |
|---|---|
git flow init |
git init |
git commit --allow-empty -m "Initial commit" |
|
git checkout -b develop master |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "scripts": { | |
| "phpcs": [ | |
| "./vendor/bin/phpcs --standard=PSR2 app/" | |
| ], | |
| "phpmd": [ | |
| "./vendor/bin/phpmd app/ text phpmd.xml" | |
| ], | |
| "security": [ | |
| "php ./common/security-checker.phar security:check composer.lock --timeout=5 --no-ansi" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # This way you can customize which branches should be skipped when | |
| # prepending commit message. | |
| if [ -z "$BRANCHES_TO_SKIP" ]; then | |
| BRANCHES_TO_SKIP=(master develop test) | |
| fi | |
| BRANCH_NAME=$(git symbolic-ref --short HEAD) | |
| BRANCH_NAME="${BRANCH_NAME##*/}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| interface iFoo { | |
| public function print(): iFoo; | |
| } | |
| interface iBar { | |
| public function write(): iBar; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| export LANGUAGE=en_US.UTF-8 | |
| export LANG=en_US.UTF-8 | |
| export LC_ALL=en_US.UTF-8 | |
| locale-gen en_US.UTF-8 | |
| sudo dpkg-reconfigure locales |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Calculates the difference between two timestamps | |
| * @param integer $d1 first date | |
| * @param integer $d2 second date | |
| * @return string | |
| */ | |
| function dateDiff($d1, $d2) { | |
| if ($d1 < $d2) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sudo sshfs -o allow_other,IdentityFile=~/.ssh/id_dsa user@XXX.XXX.XXX.XXX:/remote/path /local/path | |
| # Unmount the filesystem after you're done. | |
| sudo umount /local/path |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| function fetch($url) { | |
| $ch = curl_init(); | |
| $useragent = "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/38.0.2125.101 Safari/537.36"; | |
| $headers = []; | |
| $headers[] = "Cache-Control: max-age=0"; | |
| $headers[] = "Connection: keep-alive"; | |
| $headers[] = "Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| # Usage: ./deployer.sh whateverUser /var/www | |
| # If the user is already in other groups make sure to manually assign them to the deployer after running this script. | |
| DEPLOYER=$1 | |
| WWWDIR=$2 | |
| # Makes www-data the user's primary group | |
| sudo usermod -g www-data "$DEPLOYER" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # This code is an example for a tutorial on Ubuntu Unity/Gnome AppIndicators: | |
| # http://candidtim.github.io/appindicator/2014/09/13/ubuntu-appindicator-step-by-step.html | |
| import os | |
| import signal | |
| import json | |
| from urllib2 import Request, urlopen, URLError | |
| from gi.repository import Gtk as gtk |
NewerOlder