Skip to content

Instantly share code, notes, and snippets.

10x Ninja Rockstar

Adam Loving adamloving

10x Ninja Rockstar
Block or report user

Report or block adamloving

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
adamloving / temporary-email-address-domains
Last active Oct 14, 2019
A list of domains for disposable and temporary email addresses. Useful for filtering your email list to increase open rates (sending email to these domains likely will not be opened).
View temporary-email-address-domains
adamloving / base-neg-2.js
Created Feb 8, 2016
Toptal Codility Problem: Convert to-and-from base -2
View base-neg-2.js
'use strict';
function toDecimal(A) {
var sum = 0;
for (var i = 0; i < A.length; i++) {
sum += A[i] * Math.pow(-2, i);
return sum;
adamloving /
Created Sep 24, 2019
Python truth table and truthiness
import math
values = [
True, False, 1, 0, -1, "true", "false", "1", "0", "-1", "", None, math.inf, -math.inf, [], {}, [[]], [0], [1]
print("Truth Table")
for value in values:
print(f"\t", end="")
adamloving /
Last active Sep 23, 2019
Python is a very inelegant language. Here are some things I dislike.
# 1. Clunky lambda syntax
numbers = [1, 2, 3]
# don't do this...
doubled = list(map(lambda n: n * 2, numbers))
# There's no way to define the end of the block except that comma. What about wrapping lines?
# better for this case
doubled = [n * 2 for n in numbers]
adamloving / fb-fan-export.js
Created Jan 18, 2011
Export Facebook Page Fans
View fb-fan-export.js
For more detailed instructions on how to use this script, sign up with your email here:
DISCLOSURE: This javascript runs in your browser pretending to be you
looking through your page fans. Facebook should have no problem with this,
but who knows if they will think it is strange to see you looking through
all your fans so quickly (the script waits 3s before requesting each page).
I've had no problem running this so far for 1000s of page fans, but I
adamloving /
Last active Sep 3, 2019
Simple Git workflow for collaborating on a project. I wrote this to help a co-worker learn Git (and help me remember after a year of working on my own).

Creating the change

$ git checkout -b my-feature

... modify code ....

$ git add <filename> 
$ git commit -m “my feature is this”
adamloving /
Created Mar 25, 2015
Read PowerPoint ppt pptx using Apache Poi in java!
import org.apache.poi.xslf.usermodel.XMLSlideShow;
import org.apache.poi.POIXMLProperties.*;
import org.apache.poi.xslf.usermodel.*;
public class HelloPoi {
public static void main(String[] args) {
adamloving / common-email-providers.txt
Last active Dec 20, 2018
Sampling of popular email service providers. These were the most frequent from my list that I was able to eyeball. From an experiment to figure out what percentage of email addresses on an email list use an ISP for email as opposed to a corporate, educational, or military email address.
View common-email-providers.txt
adamloving / twitter-user-timeline.js
Created May 15, 2011
The simplest way to get a user's Twitter timeline using Javascript and jQuery
View twitter-user-timeline.js
var url = "";
$.getJSON( url, function( data ){ console.log(data) });
adamloving / .flake8.ini
Last active Oct 4, 2018
flake8 python linting configuration file
View .flake8.ini
# on macOS, put this in ~/.config/flake8
#E302 expected 2 blank lines, found 1
#E261 at least two spaces before inline comment
# E401 multiple imports on one line
You can’t perform that action at this time.