Skip to content

Instantly share code, notes, and snippets.

View furu's full-sized avatar

furu furu

View GitHub Profile
# -*- mode: ruby -*-
# vi: set ft=ruby :
# https://github.com/mitchellh/vagrant-aws
# 1. Install Vagrant
# 2. vagrant plugin install vagrant-aws
# 3. vagrant box add dummy \
# https://github.com/mitchellh/vagrant-aws/raw/master/dummy.box
# 4. vagrant up --provider=aws
// ==UserScript==
// @name inal
// @namespace https://tfrkd.org/
// @version 0.4
// @description Inject anime link into header on niconico
// @author furu
// @match http://*.nicovideo.jp/*
// @grant none
// @noframes
// ==/UserScript==
// ==UserScript==
// @name Auto New Tweets Display
// @namespace https://tfrkd.org/
// @version 0.2
// @description 10秒毎に「○件の新着ツイートを表示」を自動的に押してくれるやつ
// @author furu
// @match https://twitter.com/
// @grant none
// ==/UserScript==
'use strict';
// ==UserScript==
// @name My Hatena Bookmark Search Box Autofocus
// @namespace https://tfrkd.org/
// @version 0.2
// @description 自分のはてなブックマークページで検索ボックスにオートフォーカスさせるやつ
// @author furu
// @match http://b.hatena.ne.jp/furu33/bookmark
// @grant none
// ==/UserScript==
'use strict';
require 'selenium-webdriver'
driver = Selenium::WebDriver.for(:firefox)
driver.get('http://timvroom.com/selenium/playground/')
# 1. Grab page title and place title text in answer slot #1
driver.find_element(:id, 'answer1').send_keys(driver.title)
# 2. Fill out name section of form to be Kilgore Trout
@furu
furu / Vagrantfile
Created November 25, 2015 08:52
Revive Adserver
# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure(2) do |config|
# The most common configuration options are documented and commented below.
# For a complete reference, please see the online documentation at
{-# LANGUAGE OverloadedStrings #-}
module Main where
import Web.Twitter.Conduit
import Web.Authenticate.OAuth
import System.Environment
import qualified Data.ByteString.Char8 as BS
import Network.HTTP.Conduit
import Control.Monad.IO.Class
@furu
furu / foo.hs
Created November 20, 2015 07:01
-- 継続モナドによるリソース管理
-- http://qiita.com/tanakh/items/81fc1a0d9ae0af3865cb
-- 写経していて、継続渡しスタイルのところで脱落したやつ
module Main where
import System.IO
import Control.Exception
import Control.Monad
import Foreign.Marshal.Utils
export EDITOR="${HOME}/bin/EDITOR"
autoload -Uz edit-command-line
zle -N edit-command-line
bindkey '^xe' edit-command-line
@furu
furu / mymaybe.hs
Last active August 29, 2015 14:27 — forked from eiel/mymaybe.hs
Haskellの夏休みの宿題。
{-# LANGUAGE MonadComprehensions #-}
import Prelude hiding (maybe)
import Control.Applicative
data MyMaybe a = MyJust a | MyNothing deriving (Show)
-- 夏休みの宿題 MyMaybeの作成。Maybeを自分で実装しよう (モナドは関係ない)
-- このファイルに書かれたテストを実行するにはdoctestを利用します。
-- * stackをつかっている場合は stack install doctest