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
$ zsh | |
compdef: unknown command or service: git | |
compdef: unknown command or service: git | |
compdef: unknown command or service: git | |
compdef: unknown command or service: git | |
compdef: unknown command or service: git | |
compdef: unknown command or service: git | |
compdef: unknown command or service: git | |
$ compaudit | sudo xargs chmod g-w | |
There are insecure directories: |
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
parsed_url = URI.parse(url) | |
http = Net::HTTP.new(parsed_url.host, parsed_url.port) | |
http.use_ssl = true |
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
has no method 'static' |
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
let keyword = "swift" | |
let url = NSURL.URLWithString("http://api.atnd.org/events/?format=json&keyword="+keyword) | |
let session = NSURLSession(configuration: NSURLSessionConfiguration.defaultSessionConfiguration()) | |
let task = session.dataTaskWithURL(url, completionHandler: { | |
(data, response, err) in | |
var dic = NSJSONSerialization.JSONObjectWithData(data, options:nil, error:nil) as NSDictionary | |
var events = dic["evants"] as NSArray | |
println(events) | |
}) | |
task.resume() |
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
alias npm-exec='PATH=node_modules/.bin:$PATH' |
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
$builder = new SQL_Maker(array('driver' => 'mysql', 'strict' => 1)); | |
$builder->select('user', array('*'), array('name' => sql_in(array('foo', 'bar')))); | |
// => SELECT * FROM `user` WHERE `name` IN (?, ?) |
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
function peco-select-history() { | |
local tac | |
if which tac > /dev/null; then | |
tac="tac" | |
else | |
tac="tail -r" | |
fi | |
BUFFER=$(\history -n 1 | \ | |
eval $tac | \ | |
peco --query "$LBUFFER") |
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
source 'https://rubygems.org' | |
gem 'glint' | |
gem 'rake' | |
gem 'rspec' |
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
{ | |
:username => 'hogehoge', | |
:password => 'hugahuga', | |
} |
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
use Plack::App::CGIBin; | |
use Plack::App::PHPCGI; | |
use Plack::Builder; | |
use File::Zglob; | |
my $DOCROOT = 'public'; | |
my $php_cgi = ''; | |
$php_cgi ||= `which php-cgi`; | |
chomp($php_cgi); |