-
vim-gistaをインストール後、初回ログイン時にe-mailアドレスで
GitHubにログインする -
vim上で
:w!
しても保存できない。 -
:Gista
すると別のファイルとしてGistに保存される
This file contains 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 python | |
# coding=utf-8 | |
""" | |
Colors | |
""" | |
__author__ = 'Alisue <lambdalisue@hashnote.net>' | |
import collections | |
Colors = collections.namedtuple('Colors', [ | |
"LIGHT_PINK", "LIGHT_BROWN", "LIGHT_PURPLE", "LIGHT_ORANGE", | |
"LIGHT_BLUE", "LIGHT_GREEN", "LIGHT_RED", "LIGHT_BLACK", |
This file contains 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
# coding=utf-8 | |
""" | |
Amino acid sequence manupulation library | |
""" | |
__author__ = 'Alisue <lambdalisue@hashnote.net>' | |
AMINOACIDS = list("ARNDCEQGHILKMFPSTWYV") | |
AMINOACIDS3 = ( | |
'ALA', 'ARG', 'ASN', 'ASP', 'CYS', 'GLU', 'GLN', 'GLY', 'HIS', 'ILE', 'LEU', | |
'LYS', 'MET', 'PHE', 'PRO', 'SER', 'THR', 'TRP', 'TYR', 'VAL', | |
) |
This file contains 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
# coding=utf-8 | |
""" | |
""" | |
__author__ = 'Alisue <lambdalisue@hashnote.net>' | |
import numpy as np | |
import maidenhair | |
def calc_mean_residue_weight(weight, n): | |
""" | |
Caclulate Mean Residue Weight (MRW) by: |
This file contains 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
# coding=utf-8 | |
""" | |
Django 1.2 - 1.6 compatible manage.py | |
Modify this script to make your own manage.py | |
""" | |
__author__ = 'Alisue <lambdalisue@hashnote.net>' | |
import os | |
import sys | |
This file contains 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 python | |
#============================================================================== | |
# A generic django app test running script. | |
# | |
# Author: Alisue <lambdaliuse@hashnote.net> | |
# License: MIT license | |
#============================================================================== | |
import os | |
import sys | |
import optparse # argparse is prefered but it require python 2.7 or higher |
This file contains 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
function! gista#utils#call_on_buffer(expr, funcref, ...) abort " {{{ | |
let cbufnr = bufnr('%') | |
let save_lazyredraw = &lazyredraw | |
let &lazyredraw = 1 | |
if type(a:expr) == 0 | |
let tbufnr = a:expr | |
else | |
let tbufnr = bufnr(a:expr) | |
endif | |
if tbufnr == -1 |
This file contains 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
#!/bin/sh | |
# Shell script to install your public key on a remote machine | |
# Takes the remote machine name as an argument. | |
# Obviously, the remote machine must accept password authentication, | |
# or one of the other keys in your ssh-agent, for this to work. | |
ID_FILE="${HOME}/.ssh/id_rsa.pub" | |
if [ "-i" = "$1" ]; then |
This file contains 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
#!/bin/sh | |
# --- long way | |
ROOT=`dirname $0` | |
ROOT=`cd $ROOT;pwd` | |
# --- short way | |
ROOT=$(cd $(dirname $0);pwd) | |
# --- with readlink | |
SELF=$(readlink -f $0) |
This file contains 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
#!/bin/bash | |
if [ `which brew` = '' ]; then | |
echo "You have to install Homebrew first" | |
exit 1 | |
fi | |
echo "Installing required packages for PIL..." | |
brew install libjpeg | |
brew install https://raw.github.com/yuuna/homebrew/freetype/Library/Formula/freetype2.rb |
OlderNewer