Skip to content

Instantly share code, notes, and snippets.

View nealrs's full-sized avatar
💭
code monster

Neal Shyam nealrs

💭
code monster
View GitHub Profile
@nealrs
nealrs / cron
Created December 12, 2015 07:46
Python script + cron job to add NextDraft articles to your Instagram list every day at 5:05pm
0 5 17 ? * MON-FRI * python ~/path/instadraft.py >> ~/path/instadraft.log
@nealrs
nealrs / gist:35554cc4bcb58df95e21
Created February 25, 2016 03:25
Google Analytics: HTML5 Video Tracking
document.addEventListener('DOMContentLoaded', init, false)
var videoId = document.getElementById('video')
//var videoTitle = videoId.getAttribute('data-description')
var videoTitle = '宝宝身边有怪物'
function init () {
videoId.addEventListener('ended', videoEnd, false)
videoId.addEventListener('timeupdate', videoTimeUpdate, false)
videoId.addEventListener('play', videoPlay, false)
@nealrs
nealrs / keys.py
Last active April 18, 2016 19:26
bulk add notes to companies in prosperworks CRM
# API key
akey = "2cd366345l3derpppp3948city566ae6c"
# email address associated with API key
auser = "foo@bar.baz"
@nealrs
nealrs / gh.rb
Created June 23, 2016 15:16
search for github users in a particular geo and find their email address.
require "octokit"
require "json"
auth = "your-github-auth-token-goes-here"
Octokit.auto_paginate = true
c = Octokit::Client.new(:access_token => auth, :auto_paginate => true, :per_page =>1000)
### GET USER IDS FOR GEOS DEFINED in `locations` ###
data = []
@nealrs
nealrs / call-name.py
Last active July 29, 2016 20:04
Get caller Name from Twilio
def callerName(tel):
r = requests.get("https://lookups.twilio.com/v1/PhoneNumbers/"+tel, params={'Type': 'caller-name'}, auth=(sid, tok) )
try:
# return a list of first, last, etc. names instead of 1 string
name = r.json()['caller_name']['caller_name'].split()
except Exception, e:
print "error getting caller name: "+ repr(e)
name=None
return name
@nealrs
nealrs / check.py
Last active December 15, 2016 02:58
supply a first, last, and domain name -- and this script will run through common email patterns to find valid email addresses. worried about domains with catchalls & missing mx records? yeah we got that covered. $ python check.py eric cartman southpark.com
#!/usr/bin/env python
# encoding: utf-8
# install dependencies: sudo pip install validate_email pyDNS
# run it: python check.py robin hood gmail.com
# FYI, forwarding addresses (not catchalls) will report 'probably not valid'. that's all i've got right now.
import sys
from validate_email import validate_email
@nealrs
nealrs / 2017-06-08-derp1.md
Last active June 14, 2017 14:50
Turn your Jekyll blog into a Flash Briefing Skill for Alexa devices :)
layout title description date
post
derp1
double derp 1
2017-06-08 01:00:00 -0700

What had I expected? Four delights-snapped tributes (excesses) balance among four happy weeks as official as

@nealrs
nealrs / sp.js
Created May 9, 2018 18:19
snowplow mini test
'use strict';
const snowplow = require('snowplow-tracker');
const emitter = snowplow.emitter;
const tracker = snowplow.tracker;
// setup emitter
const e = emitter(
'com-spokenlayer.mini.snplow.net', // Collector endpoint
'https', // Optionally specify a method - http is the default
@nealrs
nealrs / checkrap.py
Last active September 27, 2018 04:34
Use rapportive.py from Jordan Wright to validate common email patterns given a first, last, and domain name.
#!/usr/bin/env python
# encoding: utf-8
# 2014 - Neal Shyam [@nealrs | nealshyam.com]
# usage: $python checkrap.py first_name last_name domain_name
# e.g: $python checkrap.py john doe gmail.com
#
#
# PLEASE DON'T BE A DICK OR USE THIS FOR EVIL.
# Seriously, the internet is a nice place, let's keep it that way.
@nealrs
nealrs / devpost-icon-black.svg
Created July 31, 2015 17:58
Devpost social icon
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.