Skip to content

Instantly share code, notes, and snippets.

require 'sinatra'
get '/' do
message = params['q'] || ''
halt 401, {'WWW-Authenticate' => "Basic realm=\"#{message}\""}, message
end
#!/bin/sh
GH_TOKEN=$1
UPLOAD_FILE=$2
GH_USER_NAME=$3
GH_REPO_NAME=$4
VERSION=$5
if [ $# -ne 5 ]; then
echo "Invalid arguments."
#!/usr/bin/env ruby
require 'mysql2-cs-bind'
require 'pit'
def get_channel_id(client, name)
channel_id = nil
client.xquery("SELECT id, name FROM channel WHERE name=?", name).each do |data|
channel_id = data['id']
end
#!/usr/bin/env ruby
# -*- coding: utf-8 -*-
require 'ircp'
require 'pit'
require 'eventmachine'
class IrcClient < EM::Connection
def initialize(options)
@nick = options[:nick]

Untitled Slide

Welcome to Glide.

Glide is the easiest way to create useful slide for all of your Gists.

  • input key <- to go backward.
  • input key -> to go forward.

Publishing

@shunirr
shunirr / yuiyuinikki_kaomoji.csv
Created November 21, 2013 16:17
ゆいゆい日記内に出てくる顔文字の一覧です。左の数値は出現回数になっています。
1728 (*-v・)
373 (∩^ω^∩)
329 (○>ω<○)
322 (´ω`)
274 (-∀-)
240 (´`)
145 (´Д`)
145 (^ω^)
130 (*-∀-)
101 (´-ω-`)
@shunirr
shunirr / wicd.md
Created November 17, 2013 08:42
Ubuntu 13.10 に Wicd を入れる

Ubuntu 13.10 に Wicd を入れる

sudo apt-get install wicd

dbus コネクションに接続できませんでしたとか言われた場合

sudo service stop wicd
// ==UserScript==
// @include http://blogos.com/outline/*
// ==/UserScript==
location.href = location.href.replace('outline', 'article')
// ==UserScript==
// @include http://news.line.me/issue/*
// ==/UserScript==
location.href = document.querySelector('.mdCMN01QuotedBy').href
// ==UserScript==
// @include http://gunosy.com/p/*
// ==/UserScript==
location.href = document.querySelector('.articles-show-click').href