I hereby claim:
- I am odedlaz on github.
- I am odedlaz (https://keybase.io/odedlaz) on keybase.
- I have a public key ASAU1lUk2Ot0OhWdA-AB6YzuAJKxIXTvwesw-v6GAZ1rlAo
To claim this, I am signing this object:
| # The following adds syntax highlighting to various programming languages | |
| # Credit goes to Ter Smitten: https://goo.gl/64YU4u | |
| export LESSOPEN="| /usr/share/source-highlight/src-hilite-lesspipe.sh %s" | |
| export LESS=' -R ' | |
| # The following adds syntax highlighting to man pages | |
| # Credit goes to Todd Weed: https://goo.gl/ZSbwZI | |
| export LESS_TERMCAP_mb=$'\e[01;31m' # begin blinking | |
| export LESS_TERMCAP_md=$'\e[01;38;5;74m' # begin bold | |
| export LESS_TERMCAP_me=$'\e[0m' # end mode |
| from tesserocr import PyTessBaseAPI | |
| import sys | |
| import os | |
| # tesserocr -> https://pypi.python.org/pypi/tesserocr | |
| # cython -> https://pypi.python.org/pypi/Cython | |
| # Pillow -> https://pypi.python.org/pypi/Pillow | |
| if len(sys.argv) != 2: | |
| print("you need to pass the path to the image as first argument") |
| import os | |
| def getenv(varname, default=None, typecast_fn=None): | |
| """ | |
| Return the value of the environment variable varname if it exists, or default if it doesn't. | |
| default defaults to None. | |
| :typecast_fn: a function that performs the typecast. if not supplied, defaults to type(value) | |
| """ | |
| #!/usr/bin/zsh | |
| function update_python_packages { | |
| USERNAME=$(logname) | |
| # run command as the user who logged in. see: https://goo.gl/akX2eo | |
| echo "Updating neovim python$1 libraries ..." | |
| source /opt/nvim/python$1/bin/activate | |
| pip install -u --upgrade pip &> /dev/null | |
| packages_to_install=$(pip list --outdated --format=legacy) |
I hereby claim:
To claim this, I am signing this object:
| #!/usr/bin/env bash | |
| filename="$1" | |
| # solution using bash | |
| count=0 | |
| while read -r line | |
| do | |
| if echo "$line" | grep "CHAPTER" > /dev/null; then | |
| ((count++)) |
| from __future__ import print_function | |
| from functools import wraps | |
| from io import SEEK_END | |
| from re import compile | |
| from sys import argv | |
| from time import sleep | |
| RE_TYPE = type(compile("")) |
| #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); | |
| } |
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:
| user nginx; | |
| worker_processes 4; | |
| error_log /var/log/nginx/error.log warn; | |
| pid /var/run/nginx.pid; | |
| events { | |
| worker_connections 1024; | |
| } |