Skip to content

Instantly share code, notes, and snippets.

View holysugar's full-sized avatar

HORII Keima holysugar

  • Aiming, Inc
  • Tokyo
View GitHub Profile
@slightair
slightair / gazoreply.user.js
Created December 4, 2013 05:57
replace gazoreply.jp copy image url
// ==UserScript==
// @name http://gazoreply.jp/
// @description replace gazoreply.jp copy image url
// @include http://gazoreply.jp/*
// @exclude http://gazoreply.jp/situation/*
// ==/UserScript==
window.addEventListener('load', function(){
var imgURL = document.getElementById("main-photo-img").getAttribute('src');
var clipboardButtonElement = document.getElementById("copy-clipboard-btn");
javascript:(function(){document.styleSheets[1].addRule('#cookieShower','background-image:url("https://dl.dropboxusercontent.com/u/34494006/cookie_clicker/cookieShower3.png") !important');document.styleSheets[1].addRule('#bigCookie','background-image:url("https://dl.dropboxusercontent.com/u/34494006/cookie_clicker/nakachan.png")');document.styleSheets[1].addRule('.cookieParticle','background-image:url("https://dl.dropboxusercontent.com/u/34494006/cookie_clicker/small_steels.png")');})();
@ymrl
ymrl / IgnoreDiffUnityFilesOnGitHub.user.js
Last active July 14, 2016 07:29
GitHubのdiff表示でUnity関係のファイルだけ折りたたむUserScript
// ==UserScript==
// @name IgnoreDiffUnityFilesOnGitHub
// @namespace http://ymrl.net/
// @include *://github.com/*/*/pull/*/files
// @include *://github.com/*/*/commit/*
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js
// ==/UserScript==
(function () {
var ignore = ["\\.unity", "\\.prefab", "\\.meta", "\\.dae"];
@holysugar
holysugar / gist:3775235
Created September 24, 2012 09:58
GoogleDrive::Spreadsheet sample
#!/usr/bin/env ruby
# coding: utf-8
require 'google_drive'
require 'highline/import'
require 'active_support/core_ext'
require 'pry'
def ask_authentication
@hdemon
hdemon / gist:3594627
Created September 2, 2012 03:37
Ember.js Ember Application Structure 邦訳 http://emberjs.com/guides/outlets/

Ember アプリケーションの構造

高レベルの話をするなら、あなたは Ember アプリケーションをネストした route の連続として設計し、それらはネストしたアプリケーションの状態(state)と一致します。このガイドではまず高レベルのコンセプトについて解説し、それから実例を見てみることにします。

ルーティング

ユーザはあなたのアプリケーションを、「何を見るか」の選択をすることで閲覧します。例えばあなたがブロクを持っているとして、あなたのユーザは最初に投稿もしくは "About" ページを選ぶでしょう。一般的に、あなたは最初の選択についてのデフォルトをもちたいはずです(このケースではおそらく投稿でしょう)。

ひとたびユーザが最初の選択をしたなら、通常彼らはそれで終わりません。コンテキストの中にある投稿群では、ユーザは最終的に個々の投稿やそれらのコメントを見るでしょう。個々の投稿の中では、彼らはコメントあるいはトラックバックのリストの閲覧を選択できます。

@jugyo
jugyo / gist:1869594
Created February 20, 2012 15:06
webmock + sinatra
require 'webmock'
require 'sinatra/base'
WebMock::API.stub_request(:any, /www\.example\.com/).to_rack(Class.new(Sinatra::Base) {
post "/foo" do
"FOO"
end
})
require 'httpclient'
require 'rspec'
class Dummy
attr_reader :arg
def initialize(arg)
@arg = arg
end
end
describe 'raise' do