I hereby claim:
- I am odedlaz on github.
- I am odedlaz (https://keybase.io/odedlaz) on keybase.
- I have a public key whose fingerprint is 5017 D338 3F64 1ADF 43C6 EF9D 515C 0ACE 5D29 39A2
To claim this, I am signing this object:
| def safe_readlines(f, block_size=32, max_file_size=1024 * 1024): | |
| read = 0 | |
| buf = "" | |
| read_block = functools.partial(f.read, 32) | |
| for block in map(bytes.decode, iter(read_block, b'')): | |
| assert read + block_size <= max_file_size, "manifest file is too big" | |
| read += len(block) | |
| first, *rest = block.splitlines() |
| #!/usr/bin/env fish | |
| # add the following line to ~/.config/fish/completions in order to add hostname completion to the script | |
| # complete -x -c vssh -d "Remote" -a "(__fish_complete_user_at_hosts)" | |
| function get_gateway --argument addr | |
| route -n get -net $addr | awk '/gateway/ { print $2 }' | |
| end | |
| function get_global_protect_interface_ipaddr_from_config |
| #!/usr/bin/env bash | |
| set -euo pipefail | |
| if [[ $EUID -ne 0 ]]; then | |
| echo "This script must be run as root" | |
| exit 1 | |
| fi | |
| code_name=$(lsb_release -c | awk '{ print $2}') |
I hereby claim:
To claim this, I am signing this object:
| #!/usr/bin/env python | |
| # sh is mighty! have a look: https://github.com/amoffat/sh | |
| from sh import awk, iwlist | |
| import requests | |
| import sys | |
| import os | |
| __dir__ = os.path.dirname(os.path.realpath(__file__)) | |
| #!/usr/bin/env python | |
| import pika | |
| import time | |
| import sys | |
| import json | |
| name = 'hello ' + sys.argv[1] | |
| connection = pika.BlockingConnection( | |
| pika.ConnectionParameters(host='localhost')) |
| version: '3' | |
| services: | |
| web: | |
| image: nginx | |
| network_mode: "host" | |
| volumes: | |
| - ./nginx.conf:/etc/nginx/nginx.conf:ro | |
| ports: | |
| - 80:80 |
| user nginx; | |
| worker_processes 4; | |
| error_log /var/log/nginx/error.log warn; | |
| pid /var/run/nginx.pid; | |
| events { | |
| worker_connections 1024; | |
| } |
TL;DR: I'm leaving Gartner Innovation Center and joining Cybereason. Why? I found myself in a comfort zone.
The blog post is split into four parts:
| #include <stdio.h> | |
| #include <stdlib.h> | |
| void dtob(unsigned int word, char* text) { | |
| for (int bit = 31; bit >= 0; bit--) { | |
| int shift = word >> bit; | |
| printf("%d", shift & 1); | |
| } | |
| printf(" (%s: %d)\n", text, word); | |
| } |