Skip to content

Instantly share code, notes, and snippets.

@aisuii
aisuii / gist:1026543
Created June 15, 2011 05:41
tettori bayaku vim ireru
src=${HOME}/src
vimpath=${HOME}/bin/vim73
mkdir -p $src
mkdir -p $vimpath
cd $src
hg clone https://vim.googlecode.com/hg/ vim
cd vim
./configure --prefix=$vimpath --enable-multibyte --with-features=huge --without-x --disable-gui
make && make install
#! /bin/sh
OSTYPE=`uname`
SED="sed"
if [ "${OSTYPE}x" != 'Linuxx' ]
then
SED="gsed"
fi
for i in `find app config db lib test spec -type f \( -name '*.rb' -o -name '*.rjs' -o -name '*.erb' -o -name '*.sel' \)`
@aisuii
aisuii / gist:1001842
Created June 1, 2011 05:44
static.ru
require 'rack'
HANDLER = Rack::Handler::Thin
PORT = 9292
PUBLIC_DIR = "public"
module Rack
class File
def _call(env)
@path_info = Rack::Utils.unescape(env["PATH_INFO"])
# -*- coding: utf-8 -*-
require 'open-uri'
require 'rubygems'
require 'active_support/core_ext'
class GetQrcode
API_URL = "http://chart.apis.google.com/chart"
API_TYPE = "qr"
IMAGE_SIZE = "100x100"
@namespace url(http://www.w3.org/1999/xhtml);
@-moz-document url-prefix("http://ameblo.jp/atsuko-maeda") {
#amebaBar,
#message,
#advertising3,
#footer_ad_official,
#sub_a,
#themeBox,
#exLinkBtn,
@namespace url(http://www.w3.org/1999/xhtml);
@-moz-document url-prefix("http://blog.oricon.co.jp/no3b/") {
#links-left,
#links,
.adView,
table[background$="blog_header_bg.jpg"],
div[style] {
display: none !important;
}
@namespace url(http://www.w3.org/1999/xhtml);
@-moz-document url-prefix("http://ameblo.jp/oshima-y/entry"),
url-prefix("http://ameblo.jp/oshima-y/page"),
url-prefix("http://ameblo.jp/oshima-y/theme"),
url("http://ameblo.jp/oshima-y"),
url("http://ameblo.jp/oshima-y/") {
#amebaBar,
#profile,
#calendar,
# rvm use xxx するたびきりかわってよくない
current_gems_sym_path="${HOME}/.current_gems"
current_gems_path="${rvm_path}/gems/${rvm_ruby_string}/gems"
if [[ -L $current_gems_sym_path ]] ; then
rm $current_gems_sym_path
elif [[ -f "${current_gems_sym_path}" ]] ; then
echo "${current_gems_sym_path} exist!"
return
@aisuii
aisuii / gist:917243
Created April 13, 2011 09:10
some_module/config.rb
require 'singleton'
require 'yaml'
require 'rubygems'
require 'active_support/core_ext'
module SomeModule
module Config
def self.included(klass)
klass.extend ClassMethods
end
@aisuii
aisuii / gist:913363
Created April 11, 2011 11:04
utils
var APP = {};
APP.data = (function(){
var data = {};
var exports = {};
var getData = function(key) {
return data[key];
};
exports.getData = getData;