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
** Unknown exception encountered with possibly-broken third-party extension hgshelve | |
** which supports versions unknown of Mercurial. | |
** Please disable hgshelve and try your action again. | |
** If that fixes the bug please report it to the extension author. | |
** Python 2.7.3 (default, Aug 1 2012, 05:16:07) [GCC 4.6.3] | |
** Mercurial Distributed SCM (version 2.6-rc) | |
** Extensions loaded: color, eol, convert, extdiff, hgshelve, histedit, info, mq, pager, progress, purge, rebase, record, schemes, transplant, hgflow | |
Traceback (most recent call last): | |
File "/usr/local/bin/hg", line 38, in <module> | |
mercurial.dispatch.run() |
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
$ pip freeze | |
Jinja2==2.7 | |
MarkupSafe==0.18 | |
Pygments==1.6 | |
Sphinx==1.2b1 | |
Tinkerer==1.2 | |
argparse==1.2.1 | |
distribute==0.6.31 | |
docutils==0.10 | |
wsgiref==0.1.2 |
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 -*- | |
from functools import wraps | |
import inspect | |
def auto_attr_init(f): | |
@wraps(f) | |
def _auto_attr_init(*args, **kwargs): | |
arg_values = args[1:] + inspect.getargspec(f).defaults | |
for pair in zip(f.__code__.co_varnames[1:], arg_values): |
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
{ | |
"rules": { | |
"block-closing-brace-newline-before": [2, "always"], | |
"block-opening-brace-space-before": [2, "always"], | |
"color-hex-case": [2, "lower"], | |
"color-hex-length": [2, "short"], | |
"color-no-invalid-hex": 2, | |
"declaration-colon-space-after": [2, "always"], | |
"declaration-colon-space-before": [2, "never"], | |
"declaration-no-important": 2, |
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
javascript:var arr=document.location.href.split('/');var name=arr[arr.length-1];var url='https://twitter.com/search?f=images&vertical=default&q=from%3A'+name+'&src=typd';document.location.href=url; |
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 -*- | |
""" | |
メディアツイートをいいねやRT順に並べて表示 | |
必要なファイルとか: | |
- twitterのConsumer Key, Consumer Secret | |
- 全ツイート履歴のCSV (twitter公式の「設定 > ユーザー情報」の一番下にある「全ツイート履歴」より) | |
インストールが必要なパッケージ: | |
- arrow |
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
import os | |
import subprocess | |
IGNORE = ['i', 'dont','wanna','update', 'these'] | |
VENVS_DIR = os.path.join(os.path.expanduser('~'), '.virtualenvs') | |
def get_venvs(): | |
p = subprocess.run("source $(which virtualenvwrapper.sh) && lsvirtualenv -b", | |
shell=True, stdout=subprocess.PIPE) |
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 -*- | |
from urllib.parse import urlunsplit | |
import requests | |
from oauthlib.oauth2 import LegacyApplicationClient | |
from requests_oauthlib import OAuth2Session | |
def register_app(client_name, host, redirect_uris='urn:ietf:wg:oauth:2.0:oob', | |
scopes='read write follow'): |
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
# Source: https://github.com/jonathanslenders/ptpython/blob/master/examples/ptpython_config/config.py | |
# Pygments CSS Themes: http://jwarby.github.io/jekyll-pygments-themes/languages/python.html | |
def configure(repl): | |
repl.vi_mode = True | |
repl.confirm_exit = False | |
repl.highlight_matching_parenthesis = True | |
repl.color_depth = "DEPTH_24_BIT" | |
repl.use_code_colorscheme("native") |