$ telnet localhost 9292
Trying ::1...
telnet: connect to address ::1: Connection refused
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
GET / HTTP/1.1
Host: localhost:9292
- GitHub Staff
- https://bento.me/kyanny
- @kyanny
- in/kyanny
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
// ==UserScript== | |
// @name github-build-badge | |
// @author linyows | |
// @namespace http://linyows.com/ | |
// @description "Expand build status badge" | |
// @include https://github.com/* | |
// ==/UserScript== | |
(function() { | |
var match_witch_badge = /<a href="(http:\/\/ci[0-9]{0,3}\..*\.[a-z]{2,5}\/job\/.*)"><img src=".*" alt="Build Status" data-canonical-src=".*" style=".*"><\/a>/g; |
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/env ruby | |
# Pull all directory under current directory, if it's on master, has no local changes, can be pulled fast-forward. | |
def git_repo? | |
`git status`.chomp !~ /Not a git repository/ | |
end | |
def not_changed? | |
`git status -s`.chomp.empty? |
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
spaghetti :: String | |
spaghetti = "gtgtsgipgttptinggipsppaigsesgpetgstpatetisiesagaeaigttetepitiatsegssieeeeatepaaiagtpieataatppiitgiapsteitatiiatpetetetttgpetpaasipttssstpeeeggtiagtttegtiipestsasgpsepaasapttgattgiatppegitiatpasgatgepttggapesaeetaeissttggieietgspagesiipestipggstttpateptitiaetottissgggtttaipappgstsptttgtpispattgegstltiappseisapgistaiagteeiptptpisaieisagstapeteietgteiisgtiptstgtstasspeatspptitttatteastsgtptgtasggpniaaeteaisett" | |
neapolitan :: String | |
neapolitan = "neapolitan" | |
solve :: String -> String -> String | |
solve [] _ = "" | |
solve xs [] = xs | |
solve (x:xs) (y:ys) |
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
Title | |
Tachikoma - Continuous gem dependency updating with pull request | |
Abstract | |
Today you manage gems of Ruby application with Bundler, but you often neglect to update. | |
Whatever gems your application depends on, you can get the most benefit by following cutting-edge. Eventually you have to update them, so if you do it more frequently you'll have less pain. |
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/env ruby | |
require 'pit' | |
require 'octokit' | |
org_name = ARGV[0] | |
unless org_name | |
abort "Usage #{$0} org_name" | |
end |
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
(defun github-url-decompose (file &optional partial) | |
(cond | |
((file-directory-p (expand-file-name ".git" file)) (cons file partial)) | |
((equal "/" file) nil) | |
(t (github-url-decompose (directory-file-name (file-name-directory file)) | |
(if partial | |
(concat (file-name-nondirectory file) "/" partial) | |
(file-name-nondirectory file)))))) | |
(defun github-url-get-origin (dir) |
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
moved to https://github.com/quipper/github-url.el |
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
# 私が考える安全なプログラムを書くために必要なこと | |
今も昔も「入力によって挙動が大幅に変わるAPI」が世の中には多数存在していて、プログラマが本来意図した挙動と異なる動作を引き起こしている。 | |
- ファイルを開こうとしたらコマンドを実行できてしまったり | |
- CSSセレクタを書いてるつもりがHTMLタグを生成してしまったり | |
- SELECT文を発行するつもりがDELETE文を発行できてしまったり | |
こういったときに | |
- 入力値検証をしないと危険になる |
(dolist (var init-form result) S式 ... )
dolist は名前が示すように、リストに関係があります。最初に init-form を評価します。このとき、評価結果はリストでなければいけません。リスト以外の場合はエラーとなります。dolist は、このリストの要素を順番に変数 var に代入して S 式を評価します。リストの要素がなくなったら result を評価し、その値が dolist の返り値になります。次の例を見てください。