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
define replace_matching_line($file, $match, $replace) { | |
exec { "/bin/sed ${file} -i.bak -e 's/${match}/${replace}/'": | |
onlyif => "/bin/grep -E '${match}' ${file}", | |
} | |
} |
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
11:25 $ sudo docker run terraform | |
TF_ACC= go test ./... -timeout=10s | |
ok github.com/hashicorp/terraform 0.005s | |
ok github.com/hashicorp/terraform/builtin/bins/provider-aws 0.004s | |
ok github.com/hashicorp/terraform/builtin/bins/provider-cloudflare 0.002s | |
? github.com/hashicorp/terraform/builtin/bins/provider-consul [no test files] | |
ok github.com/hashicorp/terraform/builtin/bins/provider-digitalocean 0.002s | |
ok github.com/hashicorp/terraform/builtin/bins/provider-dnsimple 0.002s | |
ok github.com/hashicorp/terraform/builtin/bins/provider-heroku 0.002s | |
ok github.com/hashicorp/terraform/builtin/bins/provisioner-file 0.002s |
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
#!/bin/bash | |
COUNTER=/tmp/kernel_lines # zmienna odwolujaca sie do pliku w ktorym beda ilosci linii | |
if [[ ! -f $COUNTER ]]; then echo 0 > /tmp/kernel_lines; fi # jesli nie ma pliku z liniami to go stworz i upchnij tam 0 | |
NUM=`cat $COUNTER` # ogarnij ile linijek juz jest w pliku $COUNTER | |
LINES=`sed '/\/\*/,/*\//d' $1 | sed '/^\/\//d' | sed '/^$/d' | wc -l` # wypierdol komentarze z C | |
echo "$NUM + $LINES" # pokaz ze umiesz dodac to gowno | |
echo $((NUM+LINES)) > $COUNTER # zapisz to gowno |
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
{ | |
"id": "/ctrlpkw", | |
"groups": [ | |
{ | |
"id": "/ctrlpkw/db", | |
"apps": [ | |
{ | |
"id": "/ctrlpkw/db/cassandra-seed", | |
"constraints": [["hostname", "UNIQUE"]], | |
"ports": [7199, 7000, 7001, 9160, 9042], |
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
{ | |
"id": "/ctrlpkw/db", | |
"apps": [ | |
{ | |
"id": "/ctrlpkw/db", | |
"apps": [ | |
{ | |
"id": "/ctrlpkw/db/cassandra-seed", | |
"constraints": [ | |
[ |
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
Latency Comparison Numbers | |
-------------------------- | |
L1 cache reference 0.5 ns | |
Branch mispredict 5 ns | |
L2 cache reference 7 ns 14x L1 cache | |
Mutex lock/unlock 25 ns | |
Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
Compress 1K bytes with Zippy 3,000 ns 3 us | |
Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |
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
python -c "import requests; import csv; import json; result = [row for row in csv.reader(requests.get('https://cloud-images.ubuntu.com/query/released.latest.txt').content.decode('utf-8').splitlines(), delimiter='\t')]; print(json.dumps({k[0]: k[3] for k in result}, indent=4))" |
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 json | |
import re | |
import click | |
import dataset | |
import demjson | |
import requests | |
@click.command() |
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
8 |
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
### Keybase proof | |
I hereby claim: | |
* I am 3h4x on github. | |
* I am 3h4x (https://keybase.io/3h4x) on keybase. | |
* I have a public key ASC1t1qg9WeywJV0Q35buqGz5OcVRJMV3c9dAA7LY66Knwo | |
To claim this, I am signing this object: |
OlderNewer