Skip to content

Instantly share code, notes, and snippets.

View ytspar's full-sized avatar

Yury Tsukerman ytspar

View GitHub Profile
@ytspar
ytspar / google_trends_geos.json
Created May 27, 2021 14:46
Google Trends list of geos
@ytspar
ytspar / install-python-ubuntu.sh
Created November 8, 2018 10:01
Install Python with Pyenv on Ubuntu (16.04)
sudo apt-get update
sudo apt-get install build-essential git libreadline-dev zlib1g-dev libssl-dev libbz2-dev libsqlite3-dev
curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash
# may need this, but install script above should handle it; and yeah, you can do multiline inserts with awk/sed or whatever
echo 'export PATH="/root/.pyenv/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(pyenv init -)"' >> ~/.bashrc
echo 'eval "$(pyenv virtualenv-init -)"' >> ~/.bashrc
source ~/.bashrc
pyenv install 3.6.0
@ytspar
ytspar / keybase.md
Created October 17, 2018 09:47
keybase.md

Keybase proof

I hereby claim:

  • I am ytspar on github.
  • I am ytspar (https://keybase.io/ytspar) on keybase.
  • I have a public key whose fingerprint is BA19 9597 F9F0 5EE7 E004 1C1D D7AE EB9B 3FBC FE25

To claim this, I am signing this object:

@ytspar
ytspar / latlong.rb
Created July 17, 2017 18:46
Get latitude and longitude from a string (e.g., extract an exact location from Facebook directions)
#!/usr/bin/env ruby
# Get lat, long from a string
# Example: https://wego.here.com/directions/mix//One-Ounce-for-Onion,-1912-Ekkamai12,-Sukhumvit-63-Rd.,-Klongton-Nua,-Wattana,-10110-Bangkok:e-eyJuYW1lIjoiT25lIE91bmNlIGZvciBPbmlvbiIsImFkZHJlc3MiOiIxOVwvMTIgRWtrYW1haTEyLCBTdWtodW12aXQgNjMgUmQuLCBLbG9uZ3RvbiBOdWEsIFdhdHRhbmEsIEJhbmdrb2ssIFRoYWlsYW5kIDEwMTEwIiwibGF0aXR1ZGUiOjEzLjczMDg2NjY4NDk2OSwibG9uZ2l0dWRlIjoxMDAuNTg5NzMzNDA0MTYsInByb3ZpZGVyTmFtZSI6ImZhY2Vib29rIiwicHJvdmlkZXJJZCI6MTg4MjcxMTU4MDE2MTIwfQ==?map=13.73087,100.58973,15,normal&fb_locale=en_US
# Outputs 13.73087,100.58973 and drops it into the clipboard on Mac
puts 'Enter a URL'
s = gets.chomp
Process: LittleSnapper [49669]
Path: /Applications/LittleSnapper.app/Contents/MacOS/LittleSnapper
Identifier: com.realmacsoftware.littlesnapper
Version: 1.8.2 (12900)
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: LittleSnapper [49669]
User ID: 501
Date/Time: 2015-06-25 17:30:23.242 +0200
require 'uri'
require 'net/https'
require 'json'
API_URL = "https://sl.carouselsms.com/api"
API_KEY = "[API KEY GOES HERE]"
# Simple ServiceLayer gateway class
class ServiceLayer
class Error < StandardError; end
@ytspar
ytspar / gsm-test.txt
Created August 29, 2012 10:18
GSM test
GSM encoding test
@£$¥èéùìòÇ
ØøÅåΔ_ΦΓΛΩΠΨΣΘΞ^{}\[~]|€ÆæßÉ !"#¤%&(')*+,-./0123456789:;<=>?¡ABCDEFGHIJKLMNOPQRSTUVWXYZÄÖÑܧ¿abcdefghijklmnopqrstuvwxyzäöñüà
@ytspar
ytspar / .bash_profile
Created February 20, 2012 01:24
My bash_profile
alias ls='ls -G'
# Color details - http://wiki.archlinux.org/index.php/Color_Bash_Prompt
txtblk='\[\e[0;30m\]' # Black - Regular
txtred='\[\e[0;31m\]' # Red
txtgrn='\[\e[0;32m\]' # Green
txtylw='\[\e[0;33m\]' # Yellow
txtblu='\[\e[0;34m\]' # Blue
txtpur='\[\e[0;35m\]' # Purple
txtcyn='\[\e[0;36m\]' # Cyan
@ytspar
ytspar / message_delays.md
Created January 27, 2012 19:15
Message delays

This notification is to update our... clients of the continued issue with delayed delivery of SMS messages.

Our peering partner is still working on resolution to the situation and has not provided any additional information or ETA as of this time. While our peering partner works internally to initiate resolution and as traffic volumes increase through the day, it can be expected that delayed delivery of messages will happen.

...Until a solid timeline is provided we will provide this update every 4 hours...

We apologize for this inconvenience and appreciate your patience as this matter continues. Once final resolution is verified and implemented [we] will send out a timeline and explanation.