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
# | |
# Apple SuperDrive initialization rule | |
# | |
# See: https://gist.github.com/yookoala/818c1ff057e3d965980b7fd3bf8f77a6 | |
ACTION=="add", ATTRS{idProduct}=="1500", ATTRS{idVendor}=="05ac", DRIVERS=="usb", RUN+="/usr/bin/sg_raw %r/sr%n EA 00 00 00 00 00 01" |
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
autostop: | |
autostop: [] | |
enabled: true | |
package: yandextank.plugins.Autostop | |
pandora: | |
enabled: true | |
pandora_cmd: /path/to/pandora | |
config_content: | |
pools: | |
- id: HTTP pool # Pool 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
plot: | |
area: | |
stacked: true | |
metrics: | |
- m1: {params} | |
- m2: {params} | |
axis: left | |
line: | |
left: | |
- m1: {params} |
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
# -*- coding: UTF-8 -*- | |
import logging | |
import time | |
import urllib | |
from uiautomator import Device, Adb | |
logging.basicConfig() | |
logger = logging.getLogger(__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 logging | |
from paramiko import SSHClient, AutoAddPolicy | |
logging.basicConfig(level=logging.DEBUG, | |
format='%(asctime)s %(levelname)s %(message)s') | |
logging.getLogger("paramiko.transport").setLevel(logging.DEBUG) | |
logger = logging.getLogger(__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
(pprof) list HostClient.*do | |
Total: 6.13mins | |
ROUTINE ======================== github.com/valyala/fasthttp.(*HostClient).do in /home/direvius/.gvm/pkgsets/go1.5.2/global/src/github.com/valyala/fasthttp/client.go | |
200ms 1.60mins (flat, cum) 26.08% of Total | |
. . 795:func (c *HostClient) do(req *Request, resp *Response, newConn bool) (bool, error) { | |
. . 796: if req == nil { | |
. . 797: panic("BUG: req cannot be nil") | |
. . 798: } | |
. . 799: | |
20ms 140ms 800: atomic.StoreUint32(&c.lastUseTime, uint32(time.Now().Unix()-startTimeUnix)) |
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
// reproduce amahi/spdy sending SYN_STREAM for stream#3 before stream#1 | |
package main | |
import ( | |
"crypto/tls" | |
"fmt" | |
"github.com/amahi/spdy" | |
"io" | |
"log" |
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
$ go run ./fail.go | |
[SPDY DEBUG] 2015/10/13 19:38:39 Session server started | |
[SPDY DEBUG] 2015/10/13 19:38:39 Stream #1 flow manager started | |
[SPDY DEBUG] 2015/10/13 19:38:39 Sending SYN_STREAM: | |
Frame: SYN_STREAM, Stream #1, Flags: FIN | |
Headers: | |
:method: GET | |
:path: /doodles/nusrat-fateh-ali-khans-67th-birthday | |
:version: HTTP/1.1 | |
:host: www.google.com:443 |
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
package main | |
import ( | |
"crypto/tls" | |
"fmt" | |
"github.com/amahi/spdy" | |
"io" | |
"log" | |
"net/http" | |
_ "time" |
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
{"channel": "webpush_A", "subscribe": true, "pushes": 5, "ttl": 75} |
NewerOlder