-
r8168がロードされるべき場面で、r8169がロードされてしまう
-
パケットのドロップが突発的に激増するトラブルがあったため、適切なドライバを入れる
-
http://wiki.hetzner.de/index.php/Installation_of_r8168_network_driver
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
from github import Github | |
GITHUB_TOKEN = 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' | |
g = Github(GITHUB_TOKEN) | |
def get_user(): | |
""" | |
Returns: |
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
{ | |
"title": "nekoya", | |
"rules": [ | |
{ | |
"description": "backslash", | |
"manipulators": [ | |
{ | |
"conditions": [{"input_sources": [{"language": "en"}], "type": "input_source_if"}], | |
"from": {"key_code": "international3"}, | |
"to": [{"key_code": "international3", "modifiers": "option"}], |
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 argparse | |
import json | |
import subprocess | |
from collections import namedtuple | |
def execute(arg, cwd): | |
proc = subprocess.Popen( | |
arg, | |
shell=True, |
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
if [ ! -f /etc/init.d/jenkins ];then | |
curl -L http://pkg.jenkins-ci.org/debian/jenkins-ci.org.key | sudo apt-key add - | |
echo "deb http://pkg.jenkins-ci.org/debian binary/" > /etc/apt/sources.list.d/jenkins.list | |
apt-get -y update | |
apt-get install -y jenkins | |
# wait jenkins http port | |
echo "wait Jenkins service " | |
while [ "`netstat -tunl|grep 8080`" = "" ];do echo -n "."; sleep 1; done | |
echo " ok" |
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 base64 | |
from Crypto.Cipher import Blowfish | |
from binascii import unhexlify | |
from struct import pack | |
key = unhexlify('144a6b229633360207ff9c79016fc49426f1814727b663bc39df05df9a1892073e2812df9492c1e952aac68d1ddfefba635d3a33aba21535') # "thisiskey" | |
iv = '123abc45' | |
def enc(str): |
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
<?xml version="1.0"?> | |
<root> | |
<list> | |
<item> | |
<name>nekoya</name> | |
<list> | |
<item> | |
<name>ASCII Bracket mode</name> | |
<identifier>remap.nekoya_ascii_bracket_mode</identifier> |
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
from datetime import datetime | |
import pytz | |
def dump(dt): | |
print '1. strftime : %s' % dt.strftime('%Y-%m-%d %H:%M') | |
print '2. str : %s' % dt | |
print '3. as utc : %s' % dt.astimezone(pytz.utc) | |
print '4. 3 as local : %s' % dt.astimezone(pytz.utc).astimezone(ny) | |
print '' |
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 calendar, pytz, time | |
from datetime import datetime | |
from benchmarker import Benchmarker | |
jst = pytz.timezone('Asia/Tokyo') | |
now_utc = datetime.now(pytz.utc) | |
now_jst = datetime.now(jst) | |
with Benchmarker(width=20, loop=10000) as bm: | |
for _ in bm('utc2utc'): |
NewerOlder