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
const promiseAndError = async (n: number): Promise<any> => { | |
if (n == 666) { | |
throw new Error("truly bad news"); | |
} | |
if ( n < 0 ) | |
throw new Error("Negative n illegal"); |
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 typing import List, Dict | |
import ssl | |
import asyncio | |
import websockets | |
import requests | |
import logging | |
import warnings | |
import logging | |
from pprint import pprint |
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
package main | |
import ( | |
"fmt" | |
"github.com/gorilla/mux" | |
"github.com/gorilla/securecookie" | |
"net/http" | |
) | |
// cookie handling |
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
### Keybase proof | |
I hereby claim: | |
* I am foozlevazquez on github. | |
* I am ivanvazquez (https://keybase.io/ivanvazquez) on keybase. | |
* I have a public key whose fingerprint is ED25 4BFD 568D B7B5 0550 8588 28EF 8DF0 45D3 4976 | |
To claim this, I am signing this object: |
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
#!/bin/bash | |
wget -qO- https://storage.googleapis.com/golang/go1.6.linux-amd64.tar.gz | (cd /usr/local ; tar zxf - ) | |
export PATH=${PATH}:/usr/local/go/bin | |
[ -d /root/go ] || mkdir /root/go | |
export GOPATH=/root/go | |
go get github.com/derekparker/delve/cmd/dlv |
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
[MASTER] | |
# Specify a configuration file. | |
#rcfile= | |
# Python code to execute, usually for sys.path manipulation such as | |
# pygtk.require(). | |
#init-hook= | |
# Profiled execution. |
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
SELECT table_name AS "Tables", | |
round(((data_length + index_length) / 1024 / 1024), 2) "sz MB" | |
FROM information_schema.TABLES | |
WHERE table_schema = "monitor" | |
ORDER BY (data_length + index_length) DESC; |
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
#!/bin/bash | |
set -e | |
TMPF=/tmp/mysql_tcpdump.$$ | |
tcpdump -s 65535 -x -nn -q -tttt -i any -c 50000 port 3306 > ${TMPF} | |
pt-query-digest --type tcpdump ${TMPF} | |
rm ${TMPF} | |
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
package main | |
import ( | |
"fmt" | |
) | |
func main() { | |
s1 := "foo" | |
b1 := []byte(s1) |
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
user www-data; | |
worker_processes 1; | |
pid /var/run/nginx.pid; | |
events { | |
worker_connections 1024; | |
} | |
http { | |
sendfile on; |
NewerOlder