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 | |
| # | |
| # jenkins-slave: Launch a Jenkins BuildSlave instance on this node | |
| # | |
| # chkconfig: - 99 01 | |
| # description: Enable this node to fulfill build jobs | |
| # | |
| JENKINS_WORKDIR="/var/jenkins" | |
| JENKINS_USER="jenkins" |
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
| source 'https://rubygems.org' | |
| gem 'activerecord', '4.0.0.rc1' |
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
| ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"; | |
| brew install python; | |
| echo "alias python=python3" >> ~/.bash_profile | |
| echo "alias pip=pip3" >> ~/.bash_profile |
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
| UPDATE dummy | |
| SET customer=subquery.customer, | |
| address=subquery.address, | |
| partn=subquery.partn | |
| FROM (SELECT address_id, customer, address, partn | |
| FROM /* big hairy SQL */ ...) AS subquery | |
| WHERE dummy.address_id=subquery.address_id; |
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
| SELECT | |
| tc.constraint_name, tc.table_name, kcu.column_name, | |
| ccu.table_name AS foreign_table_name, | |
| ccu.column_name AS foreign_column_name | |
| FROM | |
| information_schema.table_constraints AS tc | |
| JOIN information_schema.key_column_usage AS kcu | |
| ON tc.constraint_name = kcu.constraint_name | |
| JOIN information_schema.constraint_column_usage AS ccu | |
| ON ccu.constraint_name = tc.constraint_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
| SELECT * FROM (WITH RECURSIVE ret as ( | |
| SELECT | |
| * | |
| FROM tbl | |
| WHERE | |
| id = 50080 | |
| UNION ALL | |
| SELECT | |
| tbl.* | |
| FROM tbl |
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 install emacs --with-cocoa | |
| curl -O http://ess.r-project.org/downloads/ess/ess-17.11.tgz | |
| brew install r | |
| ## Add this to your .emacs file | |
| (add-to-list 'load-path "/Hades/Aeneas/CTX.local/ssharma/source/ess/ess-16.04/lisp") | |
| (load "ess-site") | |
| (split-window-right) | |
| (show-paren-mode 1) |
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 cask install docker | |
| ## start with docker.app and login with docker id |
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
| SELECT * | |
| FROM information_schema.columns | |
| WHERE table_name = 'your_table' |
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
| /*Create role | |
| and grant connect privileges:*/ | |
| CREATE ROLE user_read; | |
| GRANT CONNECT ON DATABASE database_name TO user_read; | |
| -- Grant select on all current tables | |
| GRANT SELECT ON ALL TABLES IN SCHEMA schema_name TO user_name; | |
| -- Change default privileges to grant select on all future tables | |
| ALTER DEFAULT PRIVILEGES FOR ROLE user_read IN SCHEMA schema_name GRANT SELECT ON TABLES TO user_read; |
OlderNewer