Skip to content

Instantly share code, notes, and snippets.

View milligramme's full-sized avatar

milligramme milligramme

View GitHub Profile
@uasi
uasi / gist:214109
Last active September 11, 2015 03:06
Show branch name in Zsh's right prompt
#
# Show branch name in Zsh's right prompt
#
autoload -Uz VCS_INFO_get_data_git; VCS_INFO_get_data_git 2> /dev/null
setopt prompt_subst
function rprompt-git-current-branch {
local name st color gitdir action
@tily
tily / bot.rb
Created June 6, 2010 07:29
twitter bot library for lazy maintainers
#!/usr/bin/env ruby
require 'tokyotyrant'
require 'rubygems'
require 'oauth'
require 'pit'
require 'json'
class Bot
include TokyoTyrant
@kowey
kowey / net.johnmacfarlane.gitit.plist
Created December 2, 2010 18:29
Edit and save in ~/Library/LaunchAgents
<?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>WorkingDirectory</key>
<string>/Users/kowey/kowey-wiki</string>
<key>KeepAlive</key>
<true/>
<key>EnvironmentVariables</key>
<dict>
@yuyalush
yuyalush / iptables_setting
Created May 10, 2011 10:04
Build rails3-server in 15 minutes at NiftyCloud
# Generated by iptables-save v1.3.5 on Wed Apr 20 22:21:15 2011
*filter
:INPUT DROP [0:0]
:FORWARD DROP [0:0]
:OUTPUT ACCEPT [82:10073]
:RH-Firewall-1-INPUT - [0:0]
-A INPUT -j RH-Firewall-1-INPUT
-A FORWARD -j DROP
-A RH-Firewall-1-INPUT -i lo -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
@moluapple
moluapple / timeToSave.jsx
Created June 22, 2011 03:35
Popup Image Notifier
/***************************
* 作为bridge启动脚本使用
* 每15分钟弹出图片提示保存文件
* 点击图片使弹窗关闭
* 测试环境: AI CS5 Win7
* ImageURL: http://cdn1.iconfinder.com/data/icons/pry_hardware/512/Time_Machine.png
***************************/
#target bridge
var time = 15; //时间设定,分钟
require 'open-uri'
Earthquake.init do
command :zalgo do |m|
tw = ""
txt = m[1]
open("http://zalgo-text.jgate.de/convert?q=#{URI.encode(txt)}&max=20") do |r|
tw = r.read
end
@tily
tily / extract_rhyme.rb
Created August 1, 2011 03:53
日本語テキストから脚韻を抽出するスクリプト (まとめ)
#!/usr/bin/env ruby
# Usage: ruby extract_rhyme.rb [-m (vowel|vowel_with_help|surface)] -n N /path/to/file.txt
# Example: ruby extract_rhyme.rb -m vowel -n 3 坊ちゃん.txt
%w|optparse MeCab|.each{|x| require x}
def main(args)
opts, args = parse_args(args)
rhyme = {}
@milligramme
milligramme / scriptui_helptip.js
Created August 1, 2011 08:55
help tip sample for scriptui
/**
* scriptui helptip
*/
var u;
var w = new Window('dialog', "help tips", u);
w.orientation = 'column';
// w.margins = 5;
w.spacing = 10;
w.alignChildren = ['fill', 'fill'];
@nbqx
nbqx / fom.rb
Created October 20, 2011 09:57
# -*- coding:utf-8 -*-
## is he/she a friend of mine plugin
Earthquake.init do
command :fom? do |m|
you, me = m[1], twitter.info['screen_name']
if twitter.friends?(you,me)
puts "@#{you} is your friend"
else
input(":user #{you}")
@komagata
komagata / list-of-tech-companys-store-page.md
Created November 18, 2011 07:58 — forked from juno/list-of-tech-companys-store-page.md
List of Tech Company's Store Page

List of Tech Company's Store Page

all suggestions are welcome => @junya