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
| [uwsgi] | |
| chdir={{project_home_dir}} | |
| mountpoint={{project_home_dir}} | |
| uid=www-data | |
| gid=www-data | |
| socket=127.0.0.1:8001 | |
| virtualenv={{virtual_env_dir}} | |
| master=True | |
| harakiri=20 | |
| pythonpath={{project_home_dir}} |
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
| #ensure that an appropriate provider is installed eg virtualbox | |
| #virtual box download: https://www.virtualbox.org/wiki/Downloads | |
| vagrant init ubuntu/trusty64; vagrant up --provider virtualbox |
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
| Manually start a server: | |
| ----------------------- | |
| pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start | |
| pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log stop | |
| pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log status | |
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
| Object.__dict__ #python | |
| Object.inspect #ruby |
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
| brew uninstall nokogiri | |
| brew install libxml2 libxslt libiconv | |
| brew link libxml2 libxslt #may need --force | |
| NOKOGIRI_USE_SYSTEM_LIBRARIES=1 gem install nokogiri |
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 8939a91 Library/Formula/libxml2.rb | |
| brew install libxml2 | |
| ln -s /usr/local/opt/libxml2/bin/xml2-config /usr/local/bin/xml2-config |
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
| protractor.wrapDriver | |
| protractor.setInstance | |
| protractor.getInstance | //(use browser for versions 0.12 upwards) | |
| protractor.By | |
| element(by.) | |
| protractor.By.binding | |
| element(by.binding('')) | |
| protractor.By.select | |
| element(by.select('')) |
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
| man awk | |
| echo 'person,,test,another' | |
| echo 'person,,test,another' | awk -F , | |
| echo 'person,,test,another' | awk -F, ' { print; } ' | |
| echo 'person,,test,another' | awk -F, ' { $2="banana"; print; } ' | |
| echo 'person,,test,another' | awk -F, ' { $2="banana"; print; } ' | |
| man awk | |
| echo 'person,,test,another' | awk -F, 'BEGIN { OFS="," } { $2="banana"; print; } ' | |
| echo 'person,,test,another' | awk -F, 'BEGIN { OFS="," } { $2="banana"; print; }' | |
| echo 'person,,test,another' | awk -F, 'BEGIN { OFS="," } { $2="banana"; print; }' |
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
| FIXME: | |
| WARNING: Nokogiri was built against LibXML version 2.7.3, but has dynamically loaded 2.7.8 | |
| or | |
| ERROR -: Incompatible library version: nokogiri.bundle requires version 11.0.0 or later, but libxml2.2.dylib provides version 10.0.0 | |
| gem uninstall nokogiri libxml-ruby | |
| brew update | |
| brew uninstall libxml2 |
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
| #!/usr/bin/env ruby | |
| require 'yaml' | |
| username = 'some_user' | |
| users = YAML.load_file('users.yaml') | |
| user = users.find { |user| user.username = username} | |
| puts user.username |