Skip to content

Instantly share code, notes, and snippets.

@norio
norio / ImageRounder.js
Created October 5, 2011 11:53
Image Rounder (Scriptographer script)
var rounder = {
values: {
radius: 10
},
components: {
radius: {
label: 'Corner Radius',
type : 'number',
units: 'point'
},
@norio
norio / gist:1168521
Created August 24, 2011 16:51
SCSS変更→CSS生成→LiveReloadでCSS反映自動化
# Chromeの最新Dev版にLiveReloadをインストール
# Chromeの拡張機能管理画面でLiveReloadの「ファイルの URL へのアクセスを許可する」にチェックを入れておく
# ターミナルでguard関係のセットアップ
$ gem install rb-fsevent
$ gem install em-websocket
$ gem install guard
$ gem install guard-livereload
$ gem install guard-sass
@norio
norio / gist:716998
Created November 26, 2010 17:37
igo-python gae test
# -*- coding: utf-8 -*-
from google.appengine.ext import webapp
from google.appengine.ext.webapp import util
import igo.Tagger
class MainHandler(webapp.RequestHandler):
def get(self):
text = self.request.get('text', u'こんにちは世界')
t = igo.Tagger.Tagger('ipadic', True)
l = t.parse(text)
$ sudo gem install google-appengine -V
$ mkdir hello && cd hello
$ appcfg.rb gem install sinatra -V
$ cat > config.ru <<EOF
require 'appengine-rack'
require 'hello'
AppEngine::Rack.configure_app(
:application => 'your-app-id',
:version => 1)
run Sinatra::Application
require 'rubygems'
require 'sinatra'
get '/' do "Hello GAE!! #{Time.now}" end
def say(text)
system "say #{text}"
end
n = %w(zero ichi knee sun yon go loku shechi hachi koo ju)
say 'de-wa-- e-ma-ka-ra-- sun-no-buy-su-tow-- sun-gha-tsuku-- suu-g-no-tohki-da-que-- ahoo-knee-nari-masu'
(1..40).each do |i|
text = i <= 10 ? n[i] : i < 20 ? "ju #{n[i%10]}" : i%10 == 0 ? "#{n[i/10]} ju" : "#{n[i/10]} ju #{n[i%10]}"
text = "-v Hysterical #{text}" if i%3 == 0 or "#{i}".include?('3')
(1..40).each {|i| if(i%3 == 0 or i.to_s.include?('3')); i="-v Hysterical #{i}" end; system "say #{i}"}
@norio
norio / applauncher
Created December 12, 2008 05:44
undefined
require 'rubygems'
require 'osx/cocoa'
require 'osx/hotkey'
def open_app(name)
`open /Applications/#{name}.app`
end
hotkeys = 'Command+Control'
app_list = {