Skip to content

Instantly share code, notes, and snippets.

View riaf's full-sized avatar
🏠
Working from home

Keisuke SATO riaf

🏠
Working from home
View GitHub Profile
#!/usr/bin/env node
var https = require('https')
, fs = require('fs')
, async = require('async');
var users = [
{
id: "riaf",
password: "$1$ZHEt3vNX$8pQ/szk.keG9.QAgY6sI4/",
// ==UserScript==
// @name GitHub PR counter
// @namespace jp.riaf.github.pull-counter
// @description GitHub pull request review counter
// @author Keisuke SATO <[email protected]>
// @run-at document-end
// @match https://github.com/*/pull/*
// @version 1.0
// ==/UserScript==
curl -X POST -d 'word=wowow' -d 'pronounce=ヲゾゾ' http://yomikata.org/ajax/vote.php
@riaf
riaf / destinations.json
Created July 24, 2012 06:22 — forked from hokkai7go/destinations.yaml
It is used to decide where I travel (in JS)
["Taiwan", "NZL"]
@riaf
riaf / destinations
Created July 24, 2012 06:08 — forked from hokkai7go/destinations.yaml
It is used to decide where I travel (in PHP)
Taiwan
NZL
@riaf
riaf / convert-less.php
Created June 26, 2012 04:56
すごく手抜きな css sprite generator
<?php
$filename = isset($argv[1]) ? realpath($argv[1]) : null;
$mixin = isset($argv[2]) ? $argv[2] : 'sprite-mixin';
$retina = isset($argv[3]) ? true : false;
if (!$filename) {
echo "fail", PHP_EOL;
exit(1);
}
@riaf
riaf / file0.php
Created June 21, 2012 04:26
コマンドラインで OGP をデバッグする ref: http://qiita.com/items/d132f8a5f0961502bad5
#!/usr/bin/env php
<?php
if (!isset($argv[1])) {
echo "Usage: php ogp.php [URL]", PHP_EOL;
exit;
}
$data = http_build_query(array(
'id' => $argv[1],
@riaf
riaf / example.html
Created May 9, 2012 07:04
Facebook API が callback 地獄になる対策的な。こういうイメージかなあ?
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<div id="fb-root"></div>
<script src="//connect.facebook.net/en_US/all.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script src="facebook-deferred.js"></script>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Ansi 0 Color</key>
<dict>
<key>Blue Component</key>
<real>0.0</real>
<key>Green Component</key>
<real>0.0</real>
@riaf
riaf / BurberryPlaidImageGenerator.php
Created February 29, 2012 07:41
php + imagick でチェック柄の画像を生成する ref: http://qiita.com/items/35f2f9e2cf42b5f96eb1
<?php
class BurberryPlaidImageGenerator
{
protected $options = array(
'x' => 100,
'y' => 100,
'colors' => array(
'#B39D62',
'#45402D',