Skip to content

Instantly share code, notes, and snippets.

View vlaskinvlad's full-sized avatar

Vlad Vlaskin vlaskinvlad

  • Facebook
  • Berlin
View GitHub Profile

Keybase proof

I hereby claim:

  • I am vlaskinvlad on github.
  • I am vlaskinvlad (https://keybase.io/vlaskinvlad) on keybase.
  • I have a public key ASCLG2BRhg7GdHcr47G8A6wVbLvwkyb6Iz2Xk98Ttrr7Cgo

To claim this, I am signing this object:

@vlaskinvlad
vlaskinvlad / geocoding_google.py
Created March 23, 2017 10:09
Geocoding Google
API_KEY="<SET HERE YOUR GOOGLE API KEY>"
def get_address(_r):
return "%s %s, %s, %s %s" % (_r['street'], _r['house_num'], _r['city'], _r['plz'], _r['country'])
def get_google_coords(adress):
url = 'https://maps.googleapis.com/maps/api/geocode/json'
@vlaskinvlad
vlaskinvlad / azure_guides.sh
Last active January 12, 2017 19:19
Azure Steps bash cloud
# This are the teps taken here:
# https://docs.microsoft.com/en-us/azure/virtual-machines/virtual-machines-linux-capture-image?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json
export RESOURCE=Locarta-Prod
export NODE=4tb.private.locarta.co
# Go to the ARM mode
azure config mode arm
#Listing the disks on the node
@vlaskinvlad
vlaskinvlad / jenkins_job_venv.sh
Last active December 29, 2016 12:25
jenkins job virtual env
#!/bin/bash
export ANSIBLE_HOST_KEY_CHECKING=False
export PATH=$WORKSPACE/venv/bin:/usr/local/bin:$PATH
if [ ! -d "venv" ]; then
virtualenv venv
fi
. venv/bin/activate
export PIP_DOWNLOAD_CACHE=/tmp/$JOB_NAME
pip install -r req.txt
@vlaskinvlad
vlaskinvlad / Docker
Last active February 6, 2017 13:34 — forked from sergey-ob/Docker
Docker shortcuts
Remove <none> images:
sudo docker images -q --filter "dangling=true" | xargs sudo docker rmi
Remove all containers:
sudo docker rm $(sudo docker ps -aq)
Remove all exited containers:
@vlaskinvlad
vlaskinvlad / geohash.py
Created November 28, 2016 17:30
goeohash example
from geohash import encode
print encode(latitude=lat, longitude=lon, precision=geohash_precision)
@vlaskinvlad
vlaskinvlad / vpn_revoke_cert.sh
Last active November 21, 2016 13:23
Docker von shortcuts (revoke, create, etc)
# Connect to docker
docker exec -it <docker image id> /bin/bash
# revoke cert
easyrsa revoke <client_name>
#generate crl file
easyrsa gen-crl
@vlaskinvlad
vlaskinvlad / -
Last active October 13, 2016 07:45
Vimrc .vimrc
set nocompatible " be iMproved, required
filetype off " required
"=====================================================
" Vundle settings
"=====================================================
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
@vlaskinvlad
vlaskinvlad / -
Last active September 1, 2016 12:19
Send template to es
./es_template.sh -h es.jupiter.pointwise.co -n visit_template -t visit_template
@vlaskinvlad
vlaskinvlad / 0_reuse_code.js
Created August 26, 2016 10:04
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console