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
android update project -p ./ |
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
def my_func(hoge,fuga,name='scot'): | |
'''comment message''' | |
print my_func.func_code.co_varnames # ('hoge', 'fuga', 'name') | |
print my_func.func_name # my_func | |
hoge_func = my_func | |
print hoge_func.func_code.co_name # my_func |
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
keytool -genkey -v -keyalg RSA -keystore .KeyStore -alias hogehoge -validity 10000 |
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
# Reset | |
Color_Off="\[\033[0m\]" # Text Reset | |
# Regular Colors | |
Black="\[\033[0;30m\]" # Black | |
Red="\[\033[0;31m\]" # Red | |
Green="\[\033[0;32m\]" # Green | |
Yellow="\[\033[0;33m\]" # Yellow | |
Blue="\[\033[0;34m\]" # Blue | |
Purple="\[\033[0;35m\]" # Purple |
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 pkgutil | |
import hoge | |
for importer, module_name, is_pkg in pkgutil.walk_packages(hoge.__path__, hoge.__name__ + "."): | |
print module_name |
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 importlib | |
m = importlib.import_module('foo.bar') |
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 json | |
m ={ 'foo':{'alice': ['first', 'second'], 'backet':'bread'}, 'bar':'hello'} | |
print json.dumps(m, sort_keys=True, indent=2) | |
""" output | |
{ | |
"bar": "hello", | |
"foo": { |
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 functools | |
class mydeco: | |
def __init__(self, *args): | |
self.args = args | |
def __call__(self, func): | |
@functools.wraps(func) |
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
android update sdk --no-ui --obsolete --force |
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
out_nic=eth0 | |
in_nic=eth1 | |
in_net_cidr=192.168.0.0/24 | |
iptables -t nat -A POSTROUTING -o ${out_nic} -j MASQUERADE | |
iptables -t nat -A POSTROUTING -o ${in_nic} -s ${in_net_cidr} -j MASQUERADE | |
dst_port=10022 | |
dst=192.168.0.5:22 |