Skip to content

Instantly share code, notes, and snippets.


teitei-tk teitei-tk

Block or report user

Report or block teitei-tk

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View file0.txt
$ npm install -g gulp
$ npm install --save-dev gulp gulp-coffee gulp-sass
import base64
from Crypto import Random
from Crypto.Cipher import AES
class AESCipher(object):
def __init__(self, key, block_size=32): = block_size
if len(key) >= len(str(block_size)):
self.key = key[:block_size]
View .gitconig
detect-branches = !git checkout $(git branch | peco)
teitei-tk / Rakefile
Created Jun 16, 2014
Rakefileにunicorn起動・停止のコマンドを追加する ref:
View Rakefile
require File.expand_path('../config/application', __FILE__)
namespace :unicorn do
# Tasks
desc "Start unicorn"
teitei-tk / application.html.erb
Created Jun 15, 2014
Railsでvendor/assets/javascripts以下にあるファイルを特定のページでのみ使用する ref:
View application.html.erb
<%= javascript_include_tag 'hoge.js', 'data-turbolinks-track' => true %>
teitei-tk / application.css
Created Jun 10, 2014
Railsでtwitter bootstrapをsubmoduleとして管理 ref:
View application.css
* This is a manifest file that'll be compiled into application.css, which will include all the files
* listed below.
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
* or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
* You're free to add application-wide styles to this file and they'll appear at the bottom of the
* compiled file so the styles you add here take precedence over styles defined in any styles
* defined in the other CSS/SCSS files in this directory. It is generally better to create a new
teitei-tk / database.yml
Created Jun 7, 2014
Vagrant(CentOS6.5)にRails4.1 + Nginx + Unicorn + MySQL環境でRailsを起動する。 ref:
View database.yml
default: &default
adapter: mysql2
encoding: utf8
pool: 5
username: hoge
password: foobar
socket: /var/lib/mysql/mysql.sock
teitei-tk / invoke.cs
Created May 20, 2014
View invoke.cs
using UnityEngine;
using System;
public class InvokeCotroller : MonoBehaviour
public void Start()
this.InvokeRepeating("Hoge", 0f, 1.0f);
teitei-tk / gist:3ce7bdf5a4971c11154f
Created May 2, 2014
View gist:3ce7bdf5a4971c11154f
# hoge branchを削除
git branch | grep hoge | xargs -I % git branch -D %
#!/usr/bin/env python
import sys
import os
import commands
import glob
import fnmatch
def recursive_glob(treeroot, pattern):
results = []
You can’t perform that action at this time.