Skip to content

Instantly share code, notes, and snippets.

View nickhargreaves's full-sized avatar
👨‍💻

Nick Hargreaves nickhargreaves

👨‍💻
View GitHub Profile
@nickhargreaves
nickhargreaves / mine_tweets_db.py
Created August 1, 2015 14:20
Mine tweets by keyword, date and location boundaries using Python and Tweepy and load into mysql database
import tweepy
from tweepy import Stream
from tweepy import OAuthHandler
from tweepy.streaming import StreamListener
import json
import datetime
import MySQLdb;
consumer_key = ''
consumer_secret = ''
@nickhargreaves
nickhargreaves / AndroidJSONParser
Created July 18, 2015 19:06
Android JSON Parser
package com.pushapp.tests;
import java.io.BufferedReader;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.List;
import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.NameValuePair;
import org.apache.http.client.HttpClient;
@nickhargreaves
nickhargreaves / google_apps_script_copy_files_with_heirarchy_and_permissions
Last active June 10, 2023 11:53
Google Apps Script: Copy Files With Hierarchy and Permissions
function copyDriveWithPermissions(){
var originFolder = DriveApp.getFolderById("XXX-XXX");
var destinationFolder = DriveApp.getFolderById("XXX-XXX");
var currentFolder = destinationFolder;
var totalCount = traverseFolder(originFolder,0, currentFolder);
}
function traverseFolder(folder,total, currentFolder) {
@nickhargreaves
nickhargreaves / geocode.php
Last active January 22, 2018 16:10
Google Maps API Show Marker using address or coordinates
<!DOCTYPE html>
<html>
<head>
<title>Geocode with Google Maps</title>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no">
<meta charset="utf-8">
<style>
html, body, #map-canvas {
height: 100%;
margin: 0px;
@nickhargreaves
nickhargreaves / 1.json
Created August 13, 2013 12:15
malawi districts
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.