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
location /webhook/17cbb307-94ec-446b-a17b-ab82594c974c { | |
if ($request_method != 'POST') { | |
return 405; | |
} | |
content_by_lua 'ngx.print(io.popen("/path/to/script.sh"):read("*a"))'; | |
} |
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
if git status --porcelain | awk '{ print $2 }' | xargs grep -r "set_trace" &>/dev/null | |
then | |
echo "Error, trying to commit with traces" | |
exit 1 | |
fi |
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
from sqlalchemy import * | |
from sqlalchemy.orm import * | |
from sqlalchemy.ext.declarative import declarative_base | |
Base = declarative_base() | |
class A(Base): | |
__tablename__ = 'a' |
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
The system is: Linux - 3.17.8-200.fc20.x86_64 - x86_64 | |
Compiling the C compiler identification source file "CMakeCCompilerId.c" succeeded. | |
Compiler: /usr/bin/cc | |
Build flags: | |
Id flags: | |
The output was: | |
0 | |
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
#![crate_type = "dylib"] | |
#[no_mangle] | |
pub extern fn fib(n: i32) -> i32 { | |
if n < 2 { | |
n | |
} else { | |
fib (n-1) + fib(n -2) | |
} |
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
#include <stdlib.h> | |
#include <stdio.h> | |
int main(){ | |
int *a; | |
a = (int *) malloc(sizeof(int) * 12); | |
for (int i = 0; i < 12 ; i++) | |
a[i] = i; | |
for (int i = 0; i < 12 ; i++) | |
printf("%i\n", a[i]); |
Questions about Distributed systems by @tsantero.
- explain the life of an http request.
- what does the FLP result teach us?
- what is a byzantine failure?
- explain CRDTs
- explain linearizability.
- how does DNS work?
- crash-stop vs crash-recovery?
- difference between soft and hard real 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
In [14]: dis(x) | |
2 0 BUILD_LIST 0 | |
3 LOAD_GLOBAL 0 (range) | |
6 LOAD_CONST 1 (10) | |
9 CALL_FUNCTION 1 | |
12 GET_ITER | |
>> 13 FOR_ITER 16 (to 32) | |
16 STORE_FAST 0 (x) | |
19 LOAD_FAST 0 (x) | |
22 LOAD_CONST 2 (1) |
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
Client: | |
Version: 1.8.1 | |
API version: 1.20 | |
Go version: go1.4.2 | |
Git commit: d12ea79 | |
Built: Thu Aug 13 02:33:17 UTC 2015 | |
OS/Arch: linux/amd64 | |
Server: | |
Version: 1.8.1 |