Skip to content

Instantly share code, notes, and snippets.

View gouf's full-sized avatar
😇
I don't know how my life work with.

Go Furuya gouf

😇
I don't know how my life work with.
View GitHub Profile
@plusjade
plusjade / github.rb
Created September 23, 2013 06:41
GitHub Pages publishing strategy for ruhoh v2.5
require 'tmpdir'
# Usage:
# add to ruhoh-site/plugins/publish/github.rb
# - Your GitHub remote must be setup properly but The command will try to walk you through it.
# - You must have a clean working directory to publish to GitHub pages since the hook is actually triggered by commits.
#
# $ cd ruhoh-site
# $ bundle exec ruhoh publish github
class Ruhoh
@willurd
willurd / web-servers.md
Last active April 26, 2024 12:46
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@mochiz
mochiz / gist:4736183
Last active April 16, 2023 03:56
rbenvとruby-buildでRuby環境を最新に保つ

rbenvとruby-buildでRuby環境を最新に保つ

更新日:2014/11/19

rbenv, ruby-buildを更新

$ cd ~/.rbenv
$ git pull origin master
$ cd ~/.rbenv/plugins/ruby-build
$ git pull origin master
"------------------------------------
" neosnippet
"------------------------------------
" neosnippet "{{{
" snippetを保存するディレクトリを設定してください
" example
" let s:default_snippet = neobundle#get_neobundle_dir() . '/neosnippet/autoload/neosnippet/snippets' " 本体に入っているsnippet
" let s:my_snippet = '~/snippet' " 自分のsnippet
" let g:neosnippet#snippets_directory = s:my_snippet
@faisalman
faisalman / baseConverter.js
Last active January 11, 2023 14:43
Convert From/To Binary/Decimal/Hexadecimal in JavaScript
/**
* Convert From/To Binary/Decimal/Hexadecimal in JavaScript
* https://gist.github.com/faisalman
*
* Copyright 2012-2015, Faisalman <fyzlman@gmail.com>
* Licensed under The MIT License
* http://www.opensource.org/licenses/mit-license
*/
(function(){
@yatt
yatt / createDatabaseAs.sh
Created November 14, 2012 14:30
駅データ.jpのデータをsqlite3に取り込むシェルスクリプト
#! /bin/sh
#
# データベース作成スクリプト.
# 引数に渡されたパスにデータベースを構成・データを投入する
#
#
# sample:
# sh createDatabaseAs.sh db.sqlite3
#
@jugyo
jugyo / gist:4071551
Created November 14, 2012 11:07
how to import ekidata for rails

駅データ.jp から以下のようなファイルをダウンロードし、 db/seeds/ekidata とか適当な場所に置く:

  • station20121102free.csv
  • line20121030free.csv
  • company20121010.csv

マイグレーション:

# db/migrate/XXXXXXXXXXXXXX_create_ekidata_stations.rb
#!/bin/bash
COMPASS="/var/lib/gems/1.8/bin/compass"
case "$1" in
""|start)
echo "Starting compass watch..."
if [ -f ./cwatch.pid ]
then
echo "Sorry, but compass is already watching this folder..."
@linjunpop
linjunpop / README.md
Created August 21, 2012 01:15
Rails flash messages with AJAX requests
@mornone
mornone / Excel.php
Created July 4, 2012 03:37 — forked from ihumanable/Excel.php
Simple Excel Writer in PHP
<?php
/**
* Simple excel writer class with no external dependencies, drop it in and have fun
* @author Matt Nowack
* @license Unlicensed
* @version 1.0
*/
class Excel {
private $col;