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 | |
| set -e | |
| set -o pipefail | |
| # sudoでTouchIDが使えるようにする | |
| if ! grep -Eq '^auth\s.*\spam_tid\.so$' /etc/pam.d/sudo; then | |
| ( set -e; set -o pipefail | |
| # 最初の auth として pam_tid.so を追加 | |
| pam_sudo=$(awk 'fixed||!/^auth /{print} !fixed&&/^auth/{print "auth sufficient pam_tid.so";print;fixed=1}' /etc/pam.d/sudo) | |
| sudo tee /etc/pam.d/sudo <<<"$pam_sudo" |
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
| cat "a_file_to_be_converted" | perl -ne '/^([\w]+)\n$/; print "\x27$1\x27, ";' > converted.csv |
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
| liquibase --url=jdbc:postgresql://<hostname or ip>/<database name> --username=machupicchubeta --driver=org.postgresql.Driver --classpath=/Users/machupicchubeta/bin/postgresql-9.3-1101.jdbc41.jar --defaultSchemaName=public diffChangeLog --referenceUrl=jdbc:postgresql://<hostname or ip>/<reference database name> --referenceUsername=machupicchubeta > `date +"%Y%m%d%H%M%S"`_alter_public_tables.xml |
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
| liquibase --defaultSchemaName=public generateChangeLog > `date +"%Y%m%d%H%M%S"`_create_public_tables.xml |
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
| "foo_bar".Split(new [] {"_"}, StringSplitOptions.RemoveEmptyEntries).Select(s => char.ToUpperInvariant(s[0]) + s.Substring(1, s.Length - 1)).Aggregate(string.Empty, (s1, s2) => s1 + s2); |
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
| liquibase --url=jdbc:postgresql://<hostname or ip>/<database name> --username=machupicchubeta --driver=org.postgresql.Driver --classpath=/Users/machupicchubeta/bin/postgresql-9.3-1101.jdbc41.jar --defaultSchemaName=public generateChangeLog > `date +"%Y%m%d%H%M%S"`_create_public_tables.xml |
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
| liquibase --url=jdbc:postgresql://<hostname or ip>/<database name> --username=machupicchubeta --driver=org.postgresql.Driver --classpath=/Users/machupicchubeta/bin/postgresql-9.3-1101.jdbc41.jar --defaultSchemaName=public --changeLogFile=20140404184159_create_public_tables.xml migrate (or update) |
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 PATH=<ODAC x86 edition installed directory>;%PATH% | |
| cd "<object-browser installed directory>" | |
| start <object-browser exe file> |
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
| env DYLD_LIBRARY_PATH=<oracle instant client directory> NLS_LANG=AMERICAN_AMERICA.UTF8 sqlplus <username>/<password>@<host>/<schema> |
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
| @books = Book.find %w(2, 5, 10).map! &:to_i |
NewerOlder