Skip to content

Instantly share code, notes, and snippets.

View joeLepper's full-sized avatar

Joe Lepper joeLepper

View GitHub Profile
@joeLepper
joeLepper / total.csv
Created April 16, 2020 20:27
total.csv
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
messages_count
1721411
1332103
1311108
1176335
1104615
1073846
1006883
957991
932771
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
count
1060820
912441
732181
679517
662055
647653
619977
549223
431745
var request = require('request')
, qs = request('querystring')
, modhash
, cookie;
function postComment () {
var parentId = 't1_cf9k3wa'
, options = {
url : 'https://api.reddit.com/api/comment',
headers : {
@joeLepper
joeLepper / gist:8895470
Created February 9, 2014 07:06
Failing request to Reddit API
{
"args": {},
"headers": {
"Host": "httpbin.org",
"X-Modhash": "x0a9j5773dbbad92a49689ff79eeb22bac92c0d59ce777f8ca",
"Connection": "close",
"Content-Length": "45",
"Set-Cookie": "2xxxxxx1,2014-02-08T23:02:23,6xxxxxxxxxxxxxxxxxxxxb96dee0c08d9ec3d26b",
"X-Request-Id": "4cf09cfa-c606-4dbc-a57c-1c6307671015",
"User-Agent": "fooBot/0.1 by username"
angular.module('seedApp', [ 'WelcomeCtrls',
'HelloCtrls',
'HelloDirective',
'ngRoute',
'templates',
'HelloFilter' ])
.config(function($routeProvider, $locationProvider) {
$routeProvider.
when('/', {
controller : 'welcomeCtrl',
@joeLepper
joeLepper / gulpfile.js
Last active January 3, 2016 01:59
gulp-jade / gulp-rename weirdness
gulp.task('jade', function(){
gulp.src(['src/js/directives/**/jade/*.jade', 'src/jade/views/*.jade'])
.pipe(jade({ pretty : true }))
.pipe(rename(function(dir,base,ext){
var result = base + ext;
return result;
}))
.pipe(gulp.dest('./src/html'));
});
@joeLepper
joeLepper / parallel.js
Created January 11, 2014 00:23
parallel example
var timer = require('timers')
, result = 0
, iter = 0;
var A = function(){
var B = function(callback){
callback(50);
}
var C = function(callback){
callback(25);
@joeLepper
joeLepper / gulpfile.js
Created January 10, 2014 18:59
My Gulpfile
var gulp = require('gulp')
, jshint = require('gulp-jshint')
, csslint = require('gulp-csslint')
, sass = require('gulp-sass')
, gconcat = require('gulp-concat')
, uglify = require('gulp-uglify')
, rename = require('gulp-rename')
, ngmin = require('gulp-ngmin')
, gzip = require('gulp-gzip')
, jade = require('gulp-jade')
@joeLepper
joeLepper / gist:8347279
Created January 10, 2014 05:03
Simple gulpJS Karma task
gulp.task('karma', function(){
spawn('karma', ['start', 'karma.config.js'], { stdio : 'inherit' });
});
## <-- this means a comment to you, Devin.
$ <-- this means type something like this into the terminal (withouth the '$')
## we need to confirm that the config file is located where we think it is. According to homeboy's snippet
## it's somewhere beneath VBoxInternal so we'll use cd "change directory" to start there.
## you'll need to use finder to locate where VirtualBox is located. My guess is it's somewhere under
## Applications, so try something like this:
$ cd /Applications