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
Started POST "/settings/update" for 127.0.0.1 at 2011-07-11 07:23:05 +0900 | |
ActionController::RoutingError (No route matches "/settings/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
これをRoR 3.0で使おうとしている | |
https://github.com/tardate/rails-twitter-oauth-sample | |
before_filterのoauth_login_requiredは呼ばれている | |
callback url: hoge.com/users/callback | |
で,コールバック時にエラー | |
Error message | |
>> | |
Unknown action | |
The action 'callback' could not be found for UsersController |
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 | |
# Show # of commits in the repository today | |
# $ cp num-of-commits.sh .git/hooks/post-commit | |
num_of_commits=$(git log --oneline --since="today 00:00:00" | wc -l | sed 's/^[ ]*//') | |
echo "Today's commits: $num_of_commits" | |
# # Repository dir | |
# cd $(git rev-parse --show-cdup) | |
# pwd=${PWD##*/} | |
# growlnotify -a GitX -t $pwd -m "Today's commits: $num_of_commits" |
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/zsh | |
# $ sleep-on-finish.sh backupd # go sleep after finished backupd | |
CMD=$1 | |
while `pgrep $CMD > dev/null`; do | |
sleep 10 | |
done | |
echo "Finished $CMD" | |
osascript -e 'tell app "Finder" to sleep' |
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
#!/usr/bin/env ruby | |
# -*- coding: utf-8 -*- | |
def fizzbuzz(n) | |
if n % 3 == 0 | |
print "Fizz" | |
end | |
if n % 5 == 0 | |
print "Buzz" | |
end |
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
public class FizzBuzz { | |
public int max; | |
FizzBuzz(int n) { | |
max = n; | |
} | |
FizzBuzz() { | |
max = 100; | |
} | |
public void show() { |
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
#!/usr/bin/env perl | |
use strict; | |
use warnings; | |
use Cwd; | |
use YAML::Any; | |
use Term::ANSIColor; | |
my $prove_file = Cwd::getcwd() . "/.prove"; | |
if (-f $prove_file) { | |
my $test_results = YAML::Any::LoadFile($prove_file)->{tests}; |
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
(defun anything-c-sources-git-project-for (pwd) | |
(loop for elt in | |
'(("Modified files (%s)" . "--modified") | |
("Untracked files (%s)" . "--others --exclude-standard") | |
("All controlled files in this project (%s)" . "")) | |
collect | |
`((name . ,(format (car elt) pwd)) | |
(init . (lambda () | |
(unless (and ,(string= (cdr elt) "") ;update candidate buffer every time except for that of all project files | |
(anything-candidate-buffer)) |
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
#!/usr/bin/env perl | |
use strict; | |
use warnings; | |
use LWP::UserAgent; | |
use Getopt::Long; | |
sub listup_changes { | |
my $ua = LWP::UserAgent->new; | |
my $response = $ua->get(qw!http://www.emacswiki.org/emacs/?action=rc;raw=1!); | |
for (split /\n/, $response->decoded_content) { |
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
#!/usr/bin/env perl | |
use strict; | |
use warnings; | |
use Encode; | |
use JSON; | |
use opts; | |
use Regexp::Common qw/URI/; | |
use URI::Fetch; | |
use XML::Feed; |