Skip to content

Instantly share code, notes, and snippets.

View supermomonga's full-sized avatar
🏠
Working from home

supermomonga supermomonga

🏠
Working from home
View GitHub Profile
@supermomonga
supermomonga / rails32template.rb
Created March 5, 2012 02:54
rails tamplate for rails3.2
# -*- coding: utf-8 -*-
#
# Usage
#
# rails new yourapp -m https://raw.github.com/gist/1976178/82f66883dcd55321a814de3648596c3046494457/rails32template.rb -T --skip-bundle
#
git :init
append_file '.gitignore', <<-END
@supermomonga
supermomonga / template.rb
Last active October 5, 2015 05:58
Rails3.2 application template
#template.rb
remove_file "public/index.html"
gem 'twitter-bootstrap-rails', :group => :assets
gem 'therubyracer', :group => :assets
gem 'less-rails', :group => :assets
gem 'devise', :group => :assets
@supermomonga
supermomonga / initialize.sh
Created May 25, 2012 18:56
initialize bash script for Max OS X
#!/bin/sh
cd ~/
home=`pwd`
# Disable dashboard
defaults write com.apple.dashboard mcx-disabled -boolean YES
killall Dock
# Remove localized file
@supermomonga
supermomonga / gist:3735405
Created September 17, 2012 03:28
rsense setting
(setq rsense-home (expand-file-name "~/lib/rsense-0.3"))
(add-to-list 'load-path (concat rsense-home "/etc"))
(require 'rsense)
;; auco-tompleteで自動補完
(add-hook 'ruby-mode-hook
(lambda ()
(add-to-list 'ac-sources 'ac-source-rsense)))
@supermomonga
supermomonga / org-latex.el
Created December 9, 2012 10:58
org-modeでの法政大学論文LaTeX用エクスポートフォーマット
;;; Classes
;; LaTeX::法政大学卒論
(when (require 'org nil t)
;;(setq org-export-latex-date-format "%Y-%m-%d")
(setq org-export-latex-classes nil)
;; 抄録class
(add-to-list 'org-export-latex-classes
'("thesis"
"
\\documentclass[11pt,a4paper]{jarticle}
@supermomonga
supermomonga / progress.py
Created December 20, 2012 04:08
simple number progress
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import time
import sys
for i in xrange(101):
time.sleep(0.05)
sys.stdout.write("\r%s" % i)
sys.stdout.flush()
@supermomonga
supermomonga / curl.py
Created December 20, 2012 21:37
test for curl in vimshell
print 'test'
@supermomonga
supermomonga / sudden-vim.py
Created December 20, 2012 22:46
test python code for curl in vimshell
print """
_人人人人人_
> V I M <
 ̄YYYYY ̄
"""
@supermomonga
supermomonga / sudden-vim-singlequote.py
Created December 20, 2012 23:17
sudden-vim-singlequote
print '''
_人人人人人_
> V I M <
 ̄YYYYY ̄
'''
#include <stdio.h>
#include <unistd.h>
int main(void) {
int i;
useconds_t delay = 20000;
fprintf(stderr, "Begin counting up.\n");
for(i = 1; i <= 100; i++) {
fprintf(stderr, "%d\r", i);
fflush(stderr);