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
| # | |
| # https://docs.openstack.org/newton/install-guide-ubuntu/launch-instance-provider.html | |
| # | |
| sudo useradd -s /bin/bash -d /opt/stack -m stack | |
| mkdir /opt/stack/log | |
| echo "stack ALL=(ALL) NOPASSWD: ALL" | sudo tee /etc/sudoers.d/stack | |
| sudo su - stack | |
| git clone https://github.com/openstack-dev/devstack.git -b stable/queens devstack/ |
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
| #It's not directly mentioned in the documentation on how to do this, so here you go. This command will tunnel everything including DNS: | |
| sshuttle --dns -vr [email protected] 0/0 --ssh-cmd 'ssh -i /your/key/path.pem' |
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 ( | |
| "fmt" | |
| "log" | |
| "strconv" | |
| "github.com/miekg/dns" | |
| ) |
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
| # Set pid of nginx master process here | |
| pid=8192 | |
| # generate gdb commands from the process's memory mappings using awk | |
| cat /proc/$pid/maps | awk '$6 !~ "^/" {split ($1,addrs,"-"); print "dump memory mem_" addrs[1] " 0x" addrs[1] " 0x" addrs[2] ;}END{print "quit"}' > gdb-commands | |
| # use gdb with the -x option to dump these memory regions to mem_* files | |
| gdb -p $pid -x gdb-commands | |
| # look for some (any) nginx.conf text |
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 ( | |
| "fmt" | |
| "math" | |
| ) | |
| func _confidence(ups int32, downs int32) float64 { | |
| d := ups + downs | |
| var n float64 = float64(d) |
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
| #!/usr/bin/env node | |
| var fs = require('fs') | |
| , url = require('url'); | |
| if (process.argv.length < 3) { | |
| console.log('Usage:\n', process.argv[1] + ' <postman collection JSON file>\n\n'); | |
| process.exit(); | |
| } |
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
| #Recommended minimum configuration: | |
| acl manager proto cache_object | |
| acl localhost src 127.0.0.1/32 | |
| acl to_localhost dst 127.0.0.0/8 | |
| acl localnet src 0.0.0.0/8 192.168.100.0/24 192.168.101.0/24 | |
| acl SSL_ports port 443 | |
| acl Safe_ports port 80 # http | |
| acl Safe_ports port 21 # ftp | |
| acl Safe_ports port 443 # https | |
| acl Safe_ports port 70 # gopher |
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
| START n=node({startId}) | |
| MATCH (n)-[?:DID]->(thing) | |
| WITH thing, (thing.year? = null) AS year_is_null | |
| WITH thing, STR(year_is_null) as null_year | |
| ORDER BY null_year, thing.year? DESC | |
| RETURN thing, thing.year? as year |