This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #! /usr/bin/env ruby | |
| # coding: utf-8 | |
| args = "" | |
| ARGV.each do |str| | |
| args += (" " + str) | |
| end | |
| `git merge #{args} 2> /dev/null` | |
| conflicts = `git ls-files -u` | |
| unless conflicts.empty? then | |
| puts "" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import re | |
| import inspect | |
| import os | |
| from flask import Flask | |
| import controller # FlaskViewを継承したViewがあるパッケージ | |
| # prepare application | |
| app = Flask(__name__) | |
| app.config.from_object('config.Config') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Geometory型の設定 | |
| from sqlalchemy import func | |
| from sqlalchemy.types import UserDefinedType | |
| class Geometory(UserDefinedType): | |
| def get_col_spec(self): | |
| # カラムの型 | |
| return "GEOMETRY" | |
| def bind_expression(self, bindvalue): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import string | |
| from random imoprt randint | |
| def rand_str(length): | |
| return ''.join(map(str,[source[randint(0, len(source) -1) ] for x in range(0,length)])) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| inoremap <left> <esc>:q!<cr> | |
| inoremap <right> <esc>:q!<cr> | |
| inoremap <up> <esc>:q!<cr> | |
| inoremap <down> <esc>:q!<cr> | |
| inoremap <BS> <esc>:q!<cr> | |
| inoremap <delete> <esc>:q!<cr> | |
| nnoremap <left> <esc>:q!<cr> | |
| nnoremap <right> <esc>:q!<cr> | |
| nnoremap <up> <esc>:q!<cr> | |
| nnoremap <down> <esc>:q!<cr> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| postcat -q $1 | nkf -wmQ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from sqlalchemy import * | |
| db = create_engine('sqlite:///test.db') | |
| metadata = MetaData(bind=db, reflect=True) | |
| for tables in metadata.tables: | |
| for row in tables.select().execute(): | |
| print(row) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| astroid==1.3.6 | |
| decorator==3.4.2 | |
| Flask==0.10.1 | |
| Flask-Classy==0.6.10 | |
| gnureadline==6.3.3 | |
| ipython==3.2.0 | |
| itsdangerous==0.24 | |
| Jinja2==2.7.3 | |
| logilab-common==0.63.2 | |
| MarkupSafe==0.23 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var elixir = require('laravel-elixir'); | |
| var gulp = require('gulp'); | |
| // npm install --save-dev gulp-shell | |
| var shell = require('gulp-shell'); | |
| /* | |
| |-------------------------------------------------------------------------- | |
| | Elixir Asset Management | |
| |-------------------------------------------------------------------------- | |
| | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| for GEM in `gem list | awk '{print($1)}'` | |
| do | |
| gem uninstall $GEM | |
| echo "gem $GEM is uninstalled" | |
| done |