Skip to content

Instantly share code, notes, and snippets.

View machupicchubeta's full-sized avatar

machupicchubeta machupicchubeta

View GitHub Profile
@machupicchubeta
machupicchubeta / add_alias_setting_on_git-completion.bash
Last active August 29, 2015 13:56
gitコマンドのエイリアスでも使えるように~/.git-competion.bashに追記した。
__git_complete g __git_main
@machupicchubeta
machupicchubeta / show_merged_commit_logs_one_line
Created March 19, 2014 13:53
show git merged logs (oneline option)
NEW_RELEASE=`git tag | grep RELEASE_ | tail -n 1`
PREVIOUS_RELEASE=`git tag | grep RELEASE_ | tail -n 2 | head -n 1`
#git log ${PREVIOUS_RELEASE}..${NEW_RELEASE} | grep 'Merge pull'
git log --oneline --merges ${PREVIOUS_RELEASE}..${NEW_RELEASE}
@machupicchubeta
machupicchubeta / string_array_map!_to_integer_array
Created March 23, 2014 11:44
string array map! to integer array
@books = Book.find %w(2, 5, 10).map! &:to_i
@machupicchubeta
machupicchubeta / sqlplus_startup_command_for_mac
Created April 3, 2014 01:58
sqlplus startup command for mac
env DYLD_LIBRARY_PATH=<oracle instant client directory> NLS_LANG=AMERICAN_AMERICA.UTF8 sqlplus <username>/<password>@<host>/<schema>
@machupicchubeta
machupicchubeta / object_browser_startup_command_for_windows_when_an_error_occurs_oci_dll
Created April 3, 2014 02:06
the command to start the object-browser in windows when an error occurs that can not read the oci.dll
set PATH=<ODAC x86 edition installed directory>;%PATH%
cd "<object-browser installed directory>"
start <object-browser exe file>
@machupicchubeta
machupicchubeta / liquibase_migrate_command
Last active August 29, 2015 13:58
liquibase migrate command
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)
@machupicchubeta
machupicchubeta / liquibase_create_changelog_command
Created April 7, 2014 00:43
liquibase create changelog command
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
@machupicchubeta
machupicchubeta / convert_snakecase_to_camelcase_in_c#
Created April 7, 2014 07:32
convert snake case to camel case in c#
"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);
@machupicchubeta
machupicchubeta / liquibase_create_changelog_command_using_properties
Created April 8, 2014 08:58
liquibase create changelog command using properties
liquibase --defaultSchemaName=public generateChangeLog > `date +"%Y%m%d%H%M%S"`_create_public_tables.xml
@machupicchubeta
machupicchubeta / liquibase_create_diff_changelog_command
Last active August 29, 2015 14:00
liquibase create __diff__ changelog command
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