Skip to content

Instantly share code, notes, and snippets.

View Taik's full-sized avatar
🌎

Thinh Nguyen Taik

🌎
  • Airbnb
  • Working remotely.
View GitHub Profile
@Taik
Taik / patch.diff
Last active November 9, 2018 18:16
--- a/auth.c 2016-08-25 09:31:15.000000000 -0400
+++ b/auth.c 2018-11-08 13:54:47.000000000 -0500
@@ -221,7 +221,7 @@
} else if (!strcmp(input_type, "text")) {
opt->type = OC_FORM_OPT_TEXT;
} else if (!strcmp(input_type, "password")) {
- if (!cstp_can_gen_tokencode(vpninfo, form, opt))
+ if (cstp_can_gen_tokencode(vpninfo, form, opt))
opt->type = OC_FORM_OPT_TOKEN;
else
@Taik
Taik / hc-run-2.txt
Created July 17, 2017 22:00
Node delete runs with api-gateway and retries
$ gcloud compute health-checks update http k8s-be-31119--b7a3e7ca126d88c1 --check-interval=1s --healthy-threshold=2 --timeout=1s --unhealthy-threshold=2
$ locust -f api/availability.py -H http://api-gateway.perf.rsrv.info AvailabilityUser --no-web -c 50 -r 10
--------------------------------------------------------------------------------------------------------------------------------------------
4 GET /api/v1/availability/: "HTTPError('500 Server Error: Internal Server Error for url: http://api-gateway.perf.rsrv.info/api/v1/availability/?venue_id=be07184e-7d8d-4810-862a-a346b31d72c0&source=RESERVE&party_size=8&start_date=2017-07-17&end_date=2017-07-17',)"
17 GET /api/v1/availability/: "HTTPError('401 Client Error: Unauthorized for url: http://api-gateway.perf.rsrv.info/api/v1/availability/?venue_id=be07184e-7d8d-4810-862a-a346b31d72c0&source=RESERVE&party_size=8&start_date=2017-07-17&end_date=2017-07-17',)"
4 GET /api/v1/availability/: "HTTPError('
javascript: (function () {
var video = document.querySelector("video.jw-video");
if (video === null) {
alert("Could not find video object");
return;
}
var src = encodeURIComponent(video.src);
if (src.indexOf("redirector.googlevideo.com") === -1) {
alert("Could not find video source");
2016-05-30 08:26:10.644 f3b9e06….js?meteor_js_resource=true:3 Exception in callback of async function: Error: Handler with name 'u' already exists.
at i._create (https://staging.socialbrew.me/f3b9e06a5b1a53281956d296dc01907c902ea6e2.js?meteor_js_resource=true:53:1589)
at i.push (https://staging.socialbrew.me/f3b9e06a5b1a53281956d296dc01907c902ea6e2.js?meteor_js_resource=true:53:1773)
at https://staging.socialbrew.me/f3b9e06a5b1a53281956d296dc01907c902ea6e2.js?meteor_js_resource=true:53:2023
at Array.forEach (native)
at Function.A.each.A.forEach (https://staging.socialbrew.me/f3b9e06a5b1a53281956d296dc01907c902ea6e2.js?meteor_js_resource=true:1:877)
at i.append (https://staging.socialbrew.me/f3b9e06a5b1a53281956d296dc01907c902ea6e2.js?meteor_js_resource=true:53:1953)
at https://staging.socialbrew.me/f3b9e06a5b1a53281956d296dc01907c902ea6e2.js?meteor_js_resource=true:53:2142
at Array.forEach (native)
In [69]: Geohash.encode(37.769, -122.442)
Out[69]: '9q8yvg8kqegk'
In [71]: Geohash.encode(37.769111, -122.442111)
Out[71]: '9q8yvg8mh08d'
@Taik
Taik / keybase.md
Last active August 29, 2015 14:21

Keybase proof

I hereby claim:

  • I am taik on github.
  • I am thinh (https://keybase.io/thinh) on keybase.
  • I have a public key whose fingerprint is 88CD D264 3E49 EF6D AE24 D8B6 BDB4 F44B 1912 E8A7

To claim this, I am signing this object:

@Taik
Taik / output.txt
Last active August 29, 2015 14:11
marrow/cache/example/basic.py output
$ python basic.py
Connecting...
Preparing...
Cache Bypass: 10 loops, best of 3: 10.8 msec per loop
Cached: 100 loops, best of 3: 5.29 msec per loop
Cached w/ Refresh: 100 loops, best of 3: 5.4 msec per loop
The 50th fibonacci number is: 12586269025 or 12586269025
Total cached objects: 51
Recorded prefixes: __main__:fibonacci
import gevent;
from gevent.pool import Pool;
#from gevent import socket;
from gevent import monkey; monkey.patch_socket();
import urllib2;
import time;
start = time.time();