start new:
tmux
start new with session name:
tmux new -s myname
| " JSDoc形式のコメントを追加(functionの行で実行する) | |
| " hogeFunc: function() の形式と function hogeFunc() に対応 | |
| " 関数定義でない場合は、コメントだけ出力する | |
| function! AddJSDoc() | |
| let l:jsDocregex = '\s*\([a-zA-Z]*\)\s*[:=]\s*function\s*(\s*\(.*\)\s*).*' | |
| let l:jsDocregex2 = '\s*function \([a-zA-Z]*\)\s*(\s*\(.*\)\s*).*' | |
| let l:line = getline('.') | |
| let l:indent = indent('.') | |
| let l:space = repeat(" ", l:indent) |
| UPSTART | |
| sudo vi /etc/init/<reponame>.conf | |
| add inside: | |
| description "<reponame>" | |
| author "name" | |
| start on (local-filesystems and net-device-up IFACE=eth0) |
| #!/bin/sh | |
| # Converts a mysqldump file into a Sqlite 3 compatible file. It also extracts the MySQL `KEY xxxxx` from the | |
| # CREATE block and create them in separate commands _after_ all the INSERTs. | |
| # Awk is choosen because it's fast and portable. You can use gawk, original awk or even the lightning fast mawk. | |
| # The mysqldump file is traversed only once. | |
| # Usage: $ ./mysql2sqlite mysqldump-opts db-name | sqlite3 database.sqlite | |
| # Example: $ ./mysql2sqlite --no-data -u root -pMySecretPassWord myDbase | sqlite3 database.sqlite |
| // Source: https://groups.google.com/forum/#!topic/angular/hVrkvaHGOfc | |
| // jsFiddle: http://jsfiddle.net/pkozlowski_opensource/PxdSP/14/ | |
| // author: Pawel Kozlowski | |
| var myApp = angular.module('myApp', []); | |
| //service style, probably the simplest one | |
| myApp.service('helloWorldFromService', function() { | |
| this.sayHello = function() { | |
| return "Hello, World!" |
| import time | |
| import json | |
| BLACK, RED, GREEN, YELLOW, BLUE, MAGENTA, CYAN, WHITE = range(8) | |
| RESET = '\033[0m' | |
| def termcolor(fg=None, bg=None): | |
| codes = [] |
| #!/usr/bin/env python | |
| # encoding: utf-8 | |
| import os | |
| text_to_prepend = '# encoding: utf-8' | |
| for root, dirs, files in os.walk('./'): | |
| for f in files: | |
| if f != 'prepend.py': |
| for file in *.markdown; do | |
| mv "$file" "`basename $file .markdown`.md" | |
| done |
| " vim: set ft=vim: | |
| "set runtimepath+=~/git_repos/vimperator-plugins | |
| let mapleader = "," | |
| " Fast tabs { | |
| map <S-H> gT | |
| map <S-L> gt | |
| " } | |
| " Now, I can close my find bar on Vimperator |