Skip to content

Instantly share code, notes, and snippets.

View yuvadm's full-sized avatar

Yuval Adam yuvadm

View GitHub Profile
@yuvadm
yuvadm / route53DynDNS.bash
Created November 28, 2012 06:50
Amazon Route 53 Dynamic DNS Updater Script
#!/bin/bash
### User Settings (things you must set)
## Location of the dnscurl.pl script
DNSCurl="/path/to/route53DynDNS/dnscurl.pl"
## The host name you wish to update/create
myHostName="*"
## Zone/domain in which host (will) reside(s)
myDomainName="example.com"
@yuvadm
yuvadm / geolocations.json
Created January 14, 2013 19:47
Israel geolocations
This file has been truncated, but you can view the full file.
{
"": {
"status": "ZERO_RESULTS",
"results": []
},
"גילת": {
"status": "OK",
"results": [
{
"geometry": {
@yuvadm
yuvadm / postfix_relay.sh
Created January 21, 2013 15:30
Configuring Postfix to Work With Gmail on Mac OS X
#### Configuring Postfix to Work With Gmail on Mac OS X
#### Based on: http://blog.y3xz.com/blog/2012/01/11/configuring-postfix-to-work-with-gmail-on-mac-os-x/
# add gmail auth details to relay_password file
sudo echo "smtp.gmail.com:587 your_user_name@gmail.com:your_password" >> /etc/postfix/relay_password
# generate lookup db
sudo postmap /etc/postfix/relay_password
# add relay config
@yuvadm
yuvadm / heatmap.coffee
Created February 2, 2013 15:10
Raw code that builds a mapbox.js layer utilizing heatmap.js
# some raw code that builds a mapbox.js layer utilizing heatmap.js
class D3Layer
constructor: (@map, points) ->
@enabled = true
@svg = d3.select(@map.parent)
.append('svg')
.attr('class', 'd3layer')
@heat = d3.select(@map.parent)
.append('div')
@yuvadm
yuvadm / rtl_fm_demod.sh
Last active September 15, 2020 05:37
rtl_fm demodulation guide
# rtl_fm demodulation guide
# based on excerpts from: http://kmkeen.com/rtl-demod-guide/index.html
# requires rtl-sdr (rtl_fm bundled), sox for audio, multimon for pager decoding
# broadcast FM radio
rtl_fm -W -f 89.1M | play -r 32k -t raw -e signed-integer -b 16 -c 1 -V1 -
# police scanner
rtl_fm -N -E -f 154.42M -f 154.75M -f 154.82M -f 154.89M -s 12k -o 4 -g 49.2 -l 70 | play -r 12k ...
@yuvadm
yuvadm / geo.py
Created February 20, 2013 18:40
Google Maps API geocoding with Hebrew support
import requests
def bulk_gecode(addresses):
res = {}
url = 'http://maps.googleapis.com/maps/api/geocode/json'
for address in addresses:
# print 'fetching ' + address
res = requests.get(url, params={
'address': address,
'sensor': 'false'
@yuvadm
yuvadm / homebrew.log
Last active December 14, 2015 10:59
Logs for homebrew issue #18199 https://github.com/mxcl/homebrew/issues/18199
/usr/bin/env perl -e use XML::Parser
/usr/bin/env perl -e use XML::Parser
==> Downloading http://freedesktop.org/software/pulseaudio/releases/pulseaudio-2.1.tar.gz
Already downloaded: /Library/Caches/Homebrew/pulseaudio-2.1.tar.gz
/usr/bin/tar xf /Library/Caches/Homebrew/pulseaudio-2.1.tar.gz
==> ./configure --prefix=/usr/local/Cellar/pulseaudio/2.1 --disable-jack --disable-hal --disable-bluez --disable-avahi --with-udev-rules-dir=/usr/local/Cellar/pulseaudio/2.1/lib/udev/rules.d --with-mac-sysroot= --with-mac-version-min=10.8 --disable-dbus
./configure --prefix=/usr/local/Cellar/pulseaudio/2.1 --disable-jack --disable-hal --disable-bluez --disable-avahi --with-udev-rules-dir=/usr/local/Cellar/pulseaudio/2.1/lib/udev/rules.d --with-mac-sysroot= --with-mac-version-min=10.8 --disable-dbus
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... ./install-sh -c -d
# Notes for installing on Samsung Series 9
# UEFI boot: LVM on LUKS
#
# See the full blog post:
# http://jasonwryan.com/blog/2013/01/25/uefi/
# check you are booted in uefi
modprobe efivars
ls /sys/firmware/efi/vars
@yuvadm
yuvadm / youtube_history.py
Last active April 12, 2022 21:38
YouTube History Scraping Script
'''
YouTube History Scraping Script by Yuval Adam
Requires Selenium and PhantomJS
A major FUCK YOU to Youtube/Google for not having a proper API for this
<^>(-_-)<^>
'''
from selenium import webdriver