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
| from smore.apispec import APISpec | |
| spec = APISpec( | |
| title='Swagger Petstore', | |
| version='1.0.0', | |
| description='This is a sample server Petstore server. You can find out more ' | |
| 'about Swagger at <a href=\"http://swagger.wordnik.com\">http://swagger.wordnik.com</a> ' | |
| 'or on irc.freenode.net, #swagger. For this sample, you can use the api ' | |
| 'key \"special-key\" to test the authorization filters', |
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
| FROM wordpress | |
| RUN apt-get update && apt-get install -y libmagickwand-6.q16-dev --no-install-recommends \ | |
| && ln -s /usr/lib/x86_64-linux-gnu/ImageMagick-6.8.9/bin-Q16/MagickWand-config /usr/bin \ | |
| && pecl install imagick \ | |
| && echo "extension=imagick.so" > /usr/local/etc/php/conf.d/ext-imagick.ini | |
| RUN apt-get update && apt-get install -y ssmtp --no-install-recommends \ | |
| && echo 'sendmail_path=/usr/sbin/sendmail -t -i\nsendmail_from=FROM_MAIL_ADDRESS' > /usr/local/etc/php/conf.d/set-sendmail.ini |
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
| # Set variables in .bashrc file | |
| # don't forget to change your path correctly! | |
| export GOPATH=$HOME/golang | |
| export GOROOT=/usr/local/opt/go/libexec | |
| export PATH=$PATH:$GOPATH/bin | |
| export PATH=$PATH:$GOROOT/bin |
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 /usr/local | |
| $ git checkout b64d9b9c431642a7dd8d85c8de5a530f2c79d924 Library/Formula/node.rb | |
| $ brew unlink node | |
| $ brew install node | |
| $ npm install -g npm@latest |
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
| // Reference: http://www.blackdogfoundry.com/blog/moving-repository-from-bitbucket-to-github/ | |
| // See also: http://www.paulund.co.uk/change-url-of-git-repository | |
| $ cd $HOME/Code/repo-directory | |
| $ git remote rename origin bitbucket | |
| $ git remote add origin https://github.com/mandiwise/awesome-new-repo.git | |
| $ git push origin master | |
| $ git remote rm bitbucket |
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
| <style type="text/css"> | |
| /****** EMAIL CLIENT BUG FIXES - BEST NOT TO CHANGE THESE ********/ | |
| .ExternalClass { | |
| width: 100%; | |
| } | |
| /* Forces Outlook.com to display emails at full width */ | |
| .ExternalClass, .ExternalClass p, .ExternalClass span, .ExternalClass font, .ExternalClass td, .ExternalClass div { line-height: 100%; } | |
| /* Forces Outlook.com to display normal line spacing, here is more on that: http://www.emailonacid.com/forum/viewthread/43/ */ | |
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
| - name: Ensure .ssh directory exists. | |
| file: dest={{ key_file | dirname }} mode=700 owner=ansible state=directory | |
| - name: Install ssh key | |
| copy: content="{{ ssh_key }}" dest={{ key_file }} mode=600 owner=ansible | |
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
| [ssh_connection] | |
| ssh_args = -F ssh.cfg | |
| control_path = ~/.ssh/mux-%r@%h:%p |
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
| import collections | |
| def dict_merge(dct, merge_dct): | |
| """ Recursive dict merge. Inspired by :meth:``dict.update()``, instead of | |
| updating only top-level keys, dict_merge recurses down into dicts nested | |
| to an arbitrary depth, updating keys. The ``merge_dct`` is merged into | |
| ``dct``. | |
| :param dct: dict onto which the merge is executed | |
| :param merge_dct: dct merged into dct |