| 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
| commands: | |
| 01updateComposer: | |
| command: export COMPOSER_HOME=/root && /usr/bin/composer.phar self-update && | |
| 02installVendors: | |
| command: /usr/bin/composer.phar install --no-dev | |
| option_settings: | |
| - namespace: aws:elasticbeanstalk:application:environment | |
| option_name: COMPOSER_HOME | |
| value: /root |
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
| function evenRound(num, decimalPlaces) { | |
| var d = decimalPlaces || 0; | |
| var m = Math.pow(10, d); | |
| var n = +(d ? num * m : num).toFixed(8); // Avoid rounding errors | |
| var i = Math.floor(n), f = n - i; | |
| var e = 1e-8; // Allow for rounding errors in f | |
| var r = (f > 0.5 - e && f < 0.5 + e) ? | |
| ((i % 2 == 0) ? i : i + 1) : Math.round(n); | |
| return d ? r / m : r; | |
| } |
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
| // paulcode.com | |
| // tidy-html5 config file (mine's named "tidy.conf") | |
| // tidy documentation is here: http://tidy.sourceforge.net/#docs | |
| // tidy-html5 documentation here: http://w3c.github.io/tidy-html5/quickref.html#drop-empty-elements | |
| join-classes: no | |
| logical-emphasis: no | |
| drop-empty-elements: no | |
| anchor-as-name: no | |
| doctype: auto |
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 | |
| /** | |
| * ABN and ACN Validator Class | |
| * @author Paul Ferrett, 2009 (http://www.paulferrett.com) | |
| */ | |
| class AbnValidator { | |
| /** | |
| * Return true if $number is a valid ABN |
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 | |
| /** | |
| * Get the ordinal suffix of an int (e.g. th, rd, st, etc.) | |
| * | |
| * @param int $n | |
| * @param bool $return_n Include $n in the string returned | |
| * @return string $n including its ordinal suffix | |
| */ | |
| function ordinal_suffix($n, $return_n = true) { |
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
| git tag -d TagName && git push origin :refs/tags/TagName |
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 | |
| # | |
| # git-mv-with-history -- move/rename file or folder, with history. | |
| # | |
| # Moving a file in git doesn't track history, so the purpose of this | |
| # utility is best explained from the kernel wiki: | |
| # | |
| # Git has a rename command git mv, but that is just for convenience. | |
| # The effect is indistinguishable from removing the file and adding another | |
| # with different name and the same content. |
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
| $ cd ~ | |
| $ sudo curl -sS https://getcomposer.org/installer | sudo php | |
| $ sudo mv composer.phar /usr/local/bin/composer | |
| $ sudo ln -s /usr/local/bin/composer /usr/bin/composer | |
| then you can run | |
| $ sudo composer install |
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
| # download docx2txt by Sandeep Kumar | |
| wget -O docx2txt.pl http://www.cs.indiana.edu/~kinzler/home/binp/docx2txt | |
| # make a wrapper | |
| echo '#!/bin/bash | |
| docx2txt.pl $1 -' > docx2txt | |
| chmod +x docx2txt | |
| # make sure docx2txt.pl and docx2txt are your current PATH. Here's a guide | |
| http://shapeshed.com/using_custom_shell_scripts_on_osx_or_linux/ |