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 / contractions.py
Created May 31, 2015 01:33
Expand common (and some very uncommon) english contractions
"""
this code is not mine! i shamelessly copied it from http://stackoverflow.com/questions/19790188/expanding-english-language-contractions-in-python
all credits go to alko and arturomp @ stack overflow.
basically, it's a big find/replace.
"""
import re
cList = {
"ain't": "am not",
@nealrs
nealrs / gitatme_demo_i133.js
Created April 13, 2016 01:43
ExcelJS demo for Git@Me
var Excel = require('exceljs');
// create workbook & add worksheet
var workbook = new Excel.Workbook();
var worksheet = workbook.addWorksheet('Discography');
// add column headers
worksheet.columns = [
{ header: 'Album', key: 'album'},
{ header: 'Year', key: 'year'}
@nealrs
nealrs / neal.json
Last active June 1, 2022 21:09
source file for NealAPI (Git@Me issue 69)
{
"neal" : [
{
"year":1983,
"live": "New Delhi, India",
"school": null,
"work": null
},
{
"year":1984,
@nealrs
nealrs / .zshrc
Last active July 25, 2021 04:50
my oh-my-zsh config
# Path to your oh-my-zsh installation.
export ZSH=$HOME/.oh-my-zsh
#autoenv
source /usr/local/opt/autoenv/activate.sh
source ~/.autoenv/activate.sh
#tmpdir
if [ -f $(which tmpdir-tab) ]; then
. $(which tmpdir-tab)
@nealrs
nealrs / page.html
Created October 28, 2016 18:23
twitter player card sample
<!DOCTYPE html>
<html>
<head>
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type' />
<meta name="twitter:card" content="player" />
<meta name="twitter:site" content="@wakeyio" />
<meta name="twitter:title" content="Hemopure ~ Wakey Wakey #26" />
<meta name="twitter:description" content="Hemopure is an artificial blood (HBOC) that’s saving lives in South Africa. It’s shelf stable and 100% compatible with all blood types." />
<meta name="twitter:image" content="https://wakey.io/public/img/thumbs/26.png" />
<meta name="twitter:player" content="https://wakey.io/embed/26" />
@nealrs
nealrs / giphy.js
Created May 5, 2014 21:32
use the giphy api to search for & add an animated gif to a webpage.
// on page load, search for & display a random gif matching your search term using the Giphy API.
// usage:
// include giphy.js in your <head>
// set q to your search term (e.g. "brunch")
// add <span id = "giphyme"></span> wherever you want to display the image. -- FYI, it will be centered.
// big ups to the Giphy crew (giphy.com)
// 2014 - Neal Shyam [@nealrs | nealshyam.com]
document.addEventListener('DOMContentLoaded', function () {
q = "finger guns"; // search query
@nealrs
nealrs / responsive-screens.js
Created January 29, 2016 03:44 — forked from ryanmark/responsive-screens.js
Easy responsive screenshots with Phantom.js
/*
* Take a set of full height screenshots for a range of screensizes.
* phantomjs responsive-screens.js http://www.cnn.com/ png
*
* This will create a directory tree in your current directory which
* mirrors the URL. All files will be named with the current time.
* You can run this on a cron to build an archive of screenshots.
**/
var page = new WebPage(),
@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.
@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 / 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