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
/* | |
blackfire@angua:~/src$ make t | |
cc t.c -o t | |
blackfire@angua:~/src$ ./t | |
&arr[0] = 0x7fdebb404b60; arr[0] = 0 | |
&arr[1] = 0x7fdebb404b61; arr[1] = 1 | |
&arr[2] = 0x7fdebb404b62; arr[2] = 2 | |
&arr[3] = 0x7fdebb404b63; arr[3] = 3 | |
&arr[4] = 0x7fdebb404b64; arr[4] = 4 | |
&arr[5] = 0x7fdebb404b65; arr[5] = 5 |
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
postgres: | |
image: "postgres:9.6" | |
restart: unless-stopped | |
environment: | |
POSTGRES_USER: awx | |
POSTGRES_PASSWORD: ___postgres_passwd | |
POSTGRES_DB: awx | |
PGDATA: /var/lib/postgresql/data/pgdata | |
command: postgres -c wal_level=replica | |
volumes: |
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 | |
SSH_MOUNTPOINT="ssh-$RANDOM" | |
set -x | |
vault mount -path="$SSH_MOUNTPOINT" ssh | |
vault write "$SSH_MOUNTPOINT/config/ca" generate_signing_key=true | |
vault write "$SSH_MOUNTPOINT/roles/example" - <<EOF | |
{ |
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
2017-01-10 | |
2017-01-11 | |
2017-01-12 | |
2017-01-13 | |
2017-01-14 | |
2017-01-17 | |
2017-01-18 | |
2017-01-19 | |
2017-01-20 ##### | |
2017-01-21 |
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
select current_timestamp - '2017-02-02 04:05'::timestamp, age('2017-02-02 04:05'::timestamp) > '30 days'::interval; | |
?column? | ?column? | |
------------------------+---------- | |
29 days 07:24:08.72743 | t | |
(1 row) |
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
module nginx_socket_write 1.0; | |
require { | |
type httpd_t; | |
type var_t; | |
type http_cache_port_t; | |
class sock_file write; | |
class tcp_socket name_connect; | |
} |
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
root@ubuntu-xenial:~# fallocate -l 1G disk1 | |
root@ubuntu-xenial:~# fallocate -l 1G disk2 | |
root@ubuntu-xenial:~# fallocate -l 1G disk3 | |
root@ubuntu-xenial:~# losetup /dev/loop0 ./disk1 | |
root@ubuntu-xenial:~# losetup /dev/loop1 ./disk2 | |
root@ubuntu-xenial:~# losetup /dev/loop2 ./disk3 | |
root@ubuntu-xenial:~# mdadm -C /dev/md0 -l 10 -n 3 --layout f2 /dev/loop[012] | |
mdadm: Defaulting to version 1.2 metadata | |
mdadm: array /dev/md0 started. | |
root@ubuntu-xenial:~# cat /proc/mdstat |
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 | |
LIST1=(foo bar baz quux) | |
LIST2=(aaa bbb ccc ddd) | |
LIST3=(eee fff ggg hhh) | |
for i in LIST{1..3}[@] | |
do | |
echo ${!i} | grep -q bbb && echo $i | |
done |
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
root@ec0:~# cat plusx.asm ; nasm -f elf64 plusx.asm && ld -s -o plusx plusx.o && od -t x1 plusx -v | awk '{ $1 = ""; gsub(/ /, "\\x", $0); print }' | tr -d '\n' | |
section .text | |
global _start | |
_start: | |
mov rdi,path | |
mov rsi,0o755 | |
mov rax,90 | |
syscall |
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
--- a/template/template.py 2016-05-04 15:18:58.000000000 +0000 | |
+++ b/template/template.py 2016-05-04 15:25:04.918007068 +0000 | |
@@ -33,5 +33,7 @@ | |
''' | |
def new_context(self, vars=None, shared=False, locals=None): | |
- return jinja2.runtime.Context(self.environment, vars.add_locals(locals), self.name, self.blocks) | |
+ if vars is not None: | |
+ vars = vars.add_locals(locals) | |
+ return jinja2.runtime.Context(self.environment, vars, self.name, self.blocks) |
NewerOlder