Skip to content

Instantly share code, notes, and snippets.

View ne-sachirou's full-sized avatar

さっちゃん ne-sachirou

View GitHub Profile
@rummelonp
rummelonp / faraday.md
Last active May 20, 2022 12:23
Ruby の HTTP クライアントライブラリ Faraday が便利そう

Ruby の HTTP クライアントライブラリ Faraday が便利そう

Ruby の HTTP クライアントライブラリ Faraday が便利そう

API ラッパの開発には [RestClient gem][rest_client_gem] だとか
OAuth の必要なものは [Net/HTTP][net_http] + [OAuth gem][oauth_gem] を使ってた

[Twitter gem][twitter_gem] や [Instagram gem][instagram_gem] など API ライブラリのソースを読んでみると
[Faraday gem][faraday_gem] というものがよく使われてた

@matope
matope / Dynamo: Amazonの高可用性Key-value Store.markdown
Last active November 18, 2022 17:54
Dynamo: Amazonの高可用性Key-value Store[和訳]
@repeatedly
repeatedly / d_master.md
Last active June 8, 2023 06:20
D言語基礎文法最速マスター

他の言語をある程度知っている人はこれを読めばD言語の基礎をマスターでき,D言語の氷山の一角くらいは知ることができると思います.対象バージョンはdmd 2.059です.

1. 基礎

ソースファイル

ASCIIかUTFしか受け付けません.それ以外の文字コードで書くとコンパイルエラーになります.

main

D言語のmainはCとは違い以下のようなシグネチャです.

@jlong
jlong / uri.js
Created April 20, 2012 13:29
URI Parsing with Javascript
var parser = document.createElement('a');
parser.href = "http://example.com:3000/pathname/?search=test#hash";
parser.protocol; // => "http:"
parser.hostname; // => "example.com"
parser.port; // => "3000"
parser.pathname; // => "/pathname/"
parser.search; // => "?search=test"
parser.hash; // => "#hash"
parser.host; // => "example.com:3000"
@teramako
teramako / u-nya-.js
Created April 18, 2012 11:21
Vimperator這いよる混沌
var U_NYA_ = {
fields: [
"(\u300d\u30fb\u03c9\u30fb)\u300d\u3046\u30fc\uff01\u3000",
"(\uff0f\u30fb\u03c9\u30fb)\uff0f\u306b\u3083\u30fc\uff01",
"(\u300d\u30fb\u03c9\u30fb)\u300d\u3046\u30fc\uff01\u3000",
"(\uff0f\u30fb\u03c9\u30fb)\uff0f\u306b\u3083\u30fc\uff01",
"(\u300d\u30fb\u03c9\u30fb)\u300d\u3046\u30fc\uff01\u3000",
"(\uff0f\u30fb\u03c9\u30fb)\uff0f\u306b\u3083\u30fc\uff01",
"Let's\uff3c(\u30fb\u03c9\u30fb)\uff0f\u306b\u3083\u30fc\uff01"
],
@goofmint
goofmint / gist:2340855
Created April 9, 2012 02:13
Pot.js demo
// 関数名を短縮化
Pot.globalize();
begin(function() {
debug('BEGIN example');
}).then(function() {
debug('BEGIN request');
// JSON を取得
@hagino3000
hagino3000 / method_missing.js
Last active January 16, 2020 13:11
__noSuchMethod__ for Chrome
/**
* Enable route to __noSuchMethod__ when unknown method calling.
*
* @param {Object} obj Target object.
* @return {Object}
*/
function enableMethodMissing(obj) {
var functionHandler = createBaseHandler({});
functionHandler.get = function(receiver, name) {
@rummelonp
rummelonp / 0-gif.md
Created February 4, 2012 16:25
GIF アニメ分解して Canvas で再生するやつ

GIF アニメ分解して Canvas で再生するやつ

GifVJ
これがクールだったのでどうにかこれを JavaScript で作れないか頑張ってみた(頑張ってる途中)

実験途中経過報告

Burrn!
ランダムで GIF アニメを全画面表示
Enter で再生/停止

@makotom
makotom / gist:1738537
Created February 4, 2012 15:39
ももんがコレクター
#!/usr/bin/php
<?php
$c = array();
for($i = 1; $i <= 30; $i += 1){
if($i !== 1) sleep(2);
$tmp = json_decode(file_get_contents("http://search.twitter.com/search.json?q=%E3%82%82%E3%82%82%E3%82%93%E3%81%8C&rpp=100&result_type=recent&page={$i}"));
$c = (isset($tmp->results) && is_array($tmp->results)) ? array_merge($c, $tmp->results) : $c;
echo "{$i}: Collected " . count($c) . " statuses.\n";
}
@teramako
teramako / extArray.jsm
Created January 12, 2012 14:01
グローバルにあるArrayを汚さずにprototype拡張などを施したArrayを生成する
// Copyright (c) 2012 by teramako <teramako.at.gmail.com>
//
// This work is licensed for reuse under an MIT license. Details are
// given in the License.txt file included with this file.
const EXPORTED_SYMBOLS = [ "Array" ];
const bind = Function.prototype.bind,
uncurryThis = bind.bind(bind.call),
ArrayDescriptors = {