Skip to content

Instantly share code, notes, and snippets.

View davidfloyd91's full-sized avatar
👣

David Floyd davidfloyd91

👣
View GitHub Profile
@davidfloyd91
davidfloyd91 / build-query-param-string.js
Created August 25, 2021 03:19
Build a query param string
/*
This function is meant to deal with lots of nonsense.
Ideally it would enjoy something like the following:
buildQueryParamString(['cool', 'okay'], '');
> "?cool&okay"
buildQueryParamString([['nifty', 'false'], ['neat', 'true']], '');
> "?nifty=false&neat=true"
buildQueryParamString([['wow', 'goodJob']], '?alreadyGotStarted=sureDid');
> "?alreadyGotStarted=sureDid&wow=goodJob"
@davidfloyd91
davidfloyd91 / googleGeolocationApiNodeExpress.js
Last active May 31, 2019 21:13
Get geographic location by querying Google's Geolocation API with Node (Express). Accompanies this brief explainer: https://davidfloyd91.github.io/google-geolocation-api-node-express/
// https://davidfloyd91.github.io/google-geolocation-api-node-express/
const express = require('express');
const https = require('https');
const app = express();
const port = 3000;
let lat, lng;
const googleKey = process.env.GOOGLE_API_KEY;
@davidfloyd91
davidfloyd91 / tweepy_futzting.py
Last active October 17, 2019 22:02
Getting started with Tweepy. Accompanies this brief explainer: https://davidfloyd91.github.io/tweepy/
# https://davidfloyd91.github.io/tweepy/
# install Tweepy:
# $ pip install tweepy
# set Twitter credentials as temporary environment variables (see post for further explanation)
# $ export CONSUMER_KEY="blahblahthisismykey98725987"
# repeat for CONSUMER_SECRET, ACCESS_TOKEN, ACCESS_TOKEN_SECRET
# test environment variables with:

Keybase proof

I hereby claim:

  • I am davidfloyd91 on github.
  • I am davidfloyd91 (https://keybase.io/davidfloyd91) on keybase.
  • I have a public key ASD77qAzOIGzNRL1j0Dpsz58dMPoGDCaBEh6MM38bj1OLgo

To claim this, I am signing this object:

@davidfloyd91
davidfloyd91 / gist:af2f52d5d955b10f10a55b80a02977db
Created August 17, 2017 06:04
0xe5b2a01E3fb48e101e9D322764AaE7ea646E061A
0xe5b2a01E3fb48e101e9D322764AaE7ea646E061A
0xAc1cc9DCfb977bf18E6d12c333453Df5A73963f0