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
module Gominashi | |
SOURCES = [ | |
{ | |
name: "toyohira_1", | |
areas: [ | |
"豊平区 豊平○条○丁目", | |
"豊平区 旭町○丁目", | |
"豊平区 水車町○丁目", | |
], | |
types: { |
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
<?php | |
// app/Lib/BitlyAPI.php | |
App::uses('HttpSocket', 'Network/Http'); | |
class BitlyAPI { | |
const LOGIN_ID = "Your ID"; | |
const API_KEY = "Your API Key"; | |
/* 短縮URLを含むjsonを取得する | |
* = example response = | |
* { |
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
web1: | |
document_root: /app/webroot | |
shared_writable_dirs: | |
- app/tmp | |
- app/tmp/cache | |
- app/tmp/logs | |
- app/tmp/sessions | |
- app/tmp/tests | |
php_version: 5.4.14 | |
php_extensions: |
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
== basic | |
$ git init | |
$ git add . | |
$ git status | |
$ git commit | |
== push | |
$ git remote add origin [url] | |
$ git push -u origin master | |
# "git push" に "-u" あるいは "--set-upstream" を付けると、push 先のブランチをトラック (デフォルトで push や pull の対象に) するように設定されます。 |
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 sinatra-book/ | |
$ bundle exec rake book:build --trace | |
** Invoke book:build (first_time) | |
** Execute book:build | |
/home/irasally/sinatra-book/vendor/wkhtmltopdf: error while loading shared libraries: libXrender.so.1: cannot open shared object file: No such file or directory | |
rake aborted! | |
command failed: "/home/irasally/sinatra-book/vendor/wkhtmltopdf" "--page-size" "Letter" "--margin-top" "0.75in" "--margin-right" "0.75in" "--margin-bottom" "0.75in" "--margin-left" "0.75in" "--encoding" "UTF-8" "--quiet" "-" "-" | |
/home/irasally/.rvm/gems/ruby-1.9.3-p286@sinatra-book/gems/pdfkit-0.5.2/lib/pdfkit/pdfkit.rb:71:in `to_pdf' | |
/home/irasally/sinatra-book/book.rb:21:in `build' | |
/home/irasally/sinatra-book/Rakefile:7:in `block (2 levels) in <top (required)>' |
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 | |
mongo localhost:27017/mongo run_command.js | |
mongo localhost:27018/mongo run_command.js | |
mongo localhost:27019/mongo run_command.js | |
# if you don't need connection infomation etc., use --quiet option. | |
# http://www.mongodb.org/display/DOCS/--quiet |
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 some.log | sort | uniq -c | sort -n | |
1 id:0000123 success. [335 msec] | |
1 id:0000456 success. [320 msec] | |
1 id:0001234 success. [318 msec] | |
1 use TABLE3_0000000001 | |
2 use TABLE1_0000000001 | |
4 use TABLE2_0000000001 | |
#### some.log |
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 git | |
==> Downloading http://git-core.googlecode.com/files/git-1.7.9.2.tar.gz | |
File already downloaded in /Users/xxx/Library/Caches/Homebrew | |
==> make prefix=/usr/local/Cellar/git/1.7.9.2 CC=/usr/bin/llvm-gcc CFLAGS=-Os -w -pipe -march=core2 -msse4.1 LDFLAGS= install | |
GIT_VERSION = 1.7.9.2 | |
* new build flags or prefix | |
* new link flags | |
./generate-cmdlist.sh > common-cmds.h+ && mv common-cmds.h+ common-cmds.h | |
rm -f git-am git-am+ && sed -e '1s|#!.*/sh|#!/bin/sh|' -e 's|@SHELL_PATH@|/bin/sh|' -e 's|@@DIFF@@|diff|' -e 's/@@GIT_VERSION@@/1.7.9.2/g' -e 's|@@LOCALEDIR@@|/usr/local/Cellar/git/1.7.9.2/share/locale|g' -e 's/@@NO_CURL@@//g' -e '/^# @@BROKEN_PATH_FIX@@$/d' git-am.sh >git-am+ && \ | |
chmod +x git-am+ && \ |
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 doctor | |
Unbrewed dylibs were found in /usr/local/lib. | |
If you didn't put them there on purpose they could cause problems when | |
building Homebrew formulae, and may need to be deleted. | |
Unexpected dylibs: | |
/usr/local/lib/libasprintf.0.dylib | |
/usr/local/lib/libcharset.1.0.0.dylib | |
/usr/local/lib/libexpat.1.5.2.dylib |
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
$ bash -s stable < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer) | |
Downloading RVM from wayneeseguin branch stable | |
% Total % Received % Xferd Average Speed Time Time Time Current | |
Dload Upload Total Spent Left Speed | |
100 125 100 125 0 0 80 0 0:00:01 0:00:01 --:--:-- 592 | |
100 799k 100 799k 0 0 123k 0 0:00:06 0:00:06 --:--:-- 183k | |
Upgrading the RVM installation in /home/xxx/.rvm/ | |
cp: cannot open `/home/xxx/.rvm/src/rvm/patches/ree/1.8.7/zlib-gc-fix.diff' for reading: Permission denied | |
RVM sourcing line found in: /home/xxx/.bashrc. |
NewerOlder