🍣
This file contains 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/php | |
<?php | |
$StatusCode = array( | |
"100" => "Continue", | |
"101" => "Switching Protocols", | |
"102" => "Processing", # RFC 2518 (WebDAV) | |
"200" => "OK", | |
"201" => "Created", | |
"202" => "Accepted", |
This file contains 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 | |
if [ $# == 0 ]; then | |
echo "引数に検索語句を指定してください" | |
exit 1 | |
fi | |
q=`echo $@ | sed -e 's/ /+/g'` | |
open -a Google\ Chrome https://www.google.com/search?q=$q |
This file contains 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
Ext.override(Ext.data.Store, { | |
refetchPage: function(page, options, forceLoad) { | |
var me = this, | |
pageSize = me.pageSize || 200, | |
start = (page - 1) * me.pageSize, | |
end = start + pageSize; | |
if (me.getCount() === me.getTotalCount() && !forceLoad) { | |
return; | |
} |
This file contains 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
function getCalendarSchedule () { | |
var calendar = CalendarApp.getCalendarsByName('予定')[0], | |
events = calendar.getEventsForDay(new Date()), | |
schedule = ''; | |
for (var i = 0; i < events.length; i++) { | |
schedule += events[i].getTitle() + '\n'; | |
} | |
return schedule; |
This file contains 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
# prompt | |
export ZSH_THEME_GIT_PROMPT_DIRTY="%{[33m%}% ✗" | |
export ZSH_THEME_GIT_PROMPT_CLEAN="" | |
function parse_git_branch() { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ \1/' | |
} | |
DEFAULT=$'\U1F430 ' | |
ERROR=$'\U1F363 ' | |
export PS1="%{[0m%} |
This file contains 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 | |
git df --cached --name-only --diff-filter=AM | grep '\.rb$' | grep -v 'db/schema.rb' | xargs bundle exec rubocop -c .rubocop.yml | |
RUBOCOP=$? | |
git df --cached --name-only --diff-filter=AM | grep '\.js$' | xargs npm run lint | |
ESLINT=$? | |
if [ $RUBOCOP -eq $ESLINT ]; then | |
exit 0 | |
else |
This file contains 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
alert('test'); |
OlderNewer