Skip to content

Instantly share code, notes, and snippets.

View gkoberger's full-sized avatar
🦉
ReadMe-ing!

Gregory Koberger gkoberger

🦉
ReadMe-ing!
View GitHub Profile
@gkoberger
gkoberger / get-subtitles.js
Created March 5, 2019 21:39
Find the name Greg in Last Week Tonight episodes
var getSubtitles = require('youtube-captions-scraper').getSubtitles;
var _ = require('lodash');
// All Last Week Tonight episodes... and a few related videos that got sucked in by mistake
var videos = ["IdirC1uFdXU","baSNHz4uiX4","-mSGwndFMp8","R7qSiEKntQA","rn6QpV2Vo-0","7VG_s2PCH_c","t0CyBv18A5k","_E9DJS6I2nE","MGpo9DQkSvQ","d5SXQ_zb1XQ","R44dRIPLZGM","s6MwGeOm8iI","abn6cPxrc5w","gvZSpET11ZY","ScmJvmzDcG0","HaBQfSAVt0s","3G7aLVWzJeo","_9BjJkqybz8","4U2eDJnwz_s","IU2ye11FyIQ","WhMGcp9xIhY","CdDBi0DheMw","MdHmp5EX5bE","TB_wx0dAPU0","ximgPmJ9A5s","5HS2TstPfW4","ygVX1z6tDGI","UpdMYOtAmKY","ViDPIyiszoo","FsZ3p9gOkpY","opi8X9hQ7q8","OjPYmEZxACM","NpPyLcQ2vdI","2nXYbGmF3_Q","etkd57lPfPU","Fmh4RdIwswE","ET_b78GSBUs","dHiAls8loz4","dFnN2toxFaY","AJm8PeWkiEU","8-hahRWhFvg","OubM8bD9kck","mOVPStnVgvU","nG2pEffLEJo","hWQiXv0sn9Y","IYfgvS0FA7U","mXQuto1fMp4","5xnZ_CeTqyM","RKjk0ECXjiQ","4NNpkv3Us1I","9fB0GBwJ2QA","rs2RlZQVXBU","g6iDZspbRMg","LEcbagW4O-s","LdhQzXHYLZ4","QCjk_NPsIqU","wrpeEitIEpA","seGgZp-XYdM","1ZAPwfrt
### Keybase proof
I hereby claim:
* I am gkoberger on github.
* I am gregory (https://keybase.io/gregory) on keybase.
* I have a public key whose fingerprint is 0E6D 9895 6887 9EE9 0491 1FBE 1F42 8099 364F CC31
To claim this, I am signing this object:
@gkoberger
gkoberger / gist:3753689
Created September 20, 2012 02:54
Get Colors From Image
// Create a new image
var image = new Image();
var imageData = false;
image.crossOrigin = '';
image.src = 'http://p.gkoberger.net/firefox/firefox.png';
// When it loads, we’re going to put it into a canvas element
image.onload = function () {
var cnvs = document.createElement('canvas');
cnvs.width = image.width;
@gkoberger
gkoberger / gist:1636822
Created January 19, 2012 00:47
SOPA.js
/* Created by Sahil Lavingia
http://sahillavingia.com/ */
$(function() {
function alphaNumericCheck(theChar) {
return ! ((theChar < 48) || (theChar > 122) || ((theChar > 57) && (theChar < 65)) || ((theChar > 90) && (theChar < 97)));
}
function censor() {
var color = $(this).css('color'),
@gkoberger
gkoberger / mozilla-flutter.css
Created December 27, 2011 20:01
Mozilla Flutter
#featured-addons li.flutter {
-moz-animation-duration: 1s;
-moz-animation-iteration-count: infinite;
-moz-animation-name: flutter;
-moz-animation-timing-function: linear;
}
@-moz-keyframes flutter {
0% { -moz-transform: matrix(1, 0, 0.3, 1, -10px, 0); }
50% { -moz-transform: matrix(1, 0, 0.4, 1, -20px, 0); }
@gkoberger
gkoberger / gist:1306451
Created October 22, 2011 20:20
How to use anon csrf
from session_csrf import anonymous_csrf
urlpatterns = patterns('',
(r'^login$', anonymous_csrf(login)),
)
@gkoberger
gkoberger / test
Created September 20, 2011 04:40
test
test
import re
import os
import shlex
import subprocess as sub
import stat
def walktree (top = ".", depthfirst = True):
names = os.listdir(top)
if not depthfirst:
@gkoberger
gkoberger / firefox.html
Created March 14, 2011 19:25
Extract colors from the Firefox logo
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Extract colors from the Firefox logo</title>
<style>
body {
margin: 70px 0 0;
}
#form {