超雑にまとめました。修正してください。
登場人物
- アプリケーション先輩: いつも忙しい。横に広がるのが得意(デブじゃない)。
- 後輩: 頼んでばっかしで役に立たない。
- サーバー先輩: アプリケーション先輩と仲がいい。Unix Socket でつながるくらい仲良し。
- プロクシ先輩: アプリケーション先輩とかサーバー先輩と後輩の間を取り持って代わりに伝えたりしてくれる。たまに勝手にレスポンスを書き換える。
/*********************************************************************** | |
* connect.c -- Make socket connection using SOCKS4/5 and HTTP tunnel. | |
* | |
* Copyright (c) 2000-2006 Shun-ichi Goto | |
* Copyright (c) 2002, J. Grant (English Corrections) | |
* Copyright (c) 2010, Reini Urban (added realm to http_auth basic) | |
* | |
* This program is free software; you can redistribute it and/or | |
* modify it under the terms of the GNU General Public License | |
* as published by the Free Software Foundation; either version 2 |
/* | |
* Copyright (c) 2013 Calvin Rien | |
* | |
* Based on the JSON parser by Patrick van Bergen | |
* http://techblog.procurios.nl/k/618/news/view/14605/14863/How-do-I-write-my-own-parser-for-JSON.html | |
* | |
* Simplified it so that it doesn't throw exceptions | |
* and can be used in Unity iPhone with maximum code stripping. | |
* | |
* Permission is hereby granted, free of charge, to any person obtaining |
#!/bin/bash | |
# install: | |
# * rename the original script to script.original | |
# * rename the wrapper.sh to script | |
# * DONE! all calls are going to be logged now | |
TIMESTAMP=`date -u +"%Y-%m-%dT%H:%M:%SZ"` | |
ME=`basename $0` | |
WRAPPED_COMMAND=$ME.original |
# lsusb | |
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub | |
Bus 001 Device 002: ID 0424:9512 Standard Microsystems Corp. | |
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. | |
Bus 001 Device 006: ID 05e3:0606 Genesys Logic, Inc. USB 2.0 Hub / D-Link DUB-H4 USB 2.0 Hub | |
Bus 001 Device 009: ID 1130:f211 Tenx Technology, Inc. TP6911 Audio Headset | |
# cat d.py | |
import pyaudio |
# -*- coding: utf-8 -*- | |
#test on python 3.4 ,python of lower version has different module organization. | |
import http.server | |
from http.server import HTTPServer, BaseHTTPRequestHandler | |
import socketserver | |
PORT = 8080 | |
Handler = http.server.SimpleHTTPRequestHandler |
javascript:(function(){ | |
setInterval(function(){ | |
console.log("Auto Saving..."); | |
var data = $("#gist-form").serialize(); | |
var actionUrl = $("#gist-form").attr('action'); | |
try { | |
$.post(actionUrl, data); } | |
catch(err) {} | |
$("<p class='cjs-autosave'>Autosaved gist!</p>").insertAfter("div.main #gists"); | |
$("p.cjs-autosave").fadeOut(4000); |
import urllib.parse | |
url = "http://stackoverflow.com/search?q=question" | |
params = {'lang':'en','tag':'python'} | |
url_parts = list(urllib.parse.urlparse(url)) | |
query = dict(urllib.parse.parse_qsl(url_parts[4])) | |
query.update(params) | |
url_parts[4] = urllib.parse.urlencode(query) |
var list = document.getElementsByClassName('pl-video-time'); | |
var time = 0; | |
function toS(hms) { | |
var a = hms.split(':'); | |
while (a.length < 3) { | |
a.unshift(0); | |
} | |
var seconds = (+a[0]) * 60 * 60 + (+a[1]) * 60 + (+a[2]); | |
return seconds; |
xhost + ${hostname}
to allow connections to the macOS host *export HOSTNAME=`hostname`
* environment: