Skip to content

Instantly share code, notes, and snippets.

View elgreg's full-sized avatar
💭
Inside

Greg Lavallee elgreg

💭
Inside
View GitHub Profile
@elgreg
elgreg / keybase.md
Created March 11, 2021 16:13
keybase.md

Keybase proof

I hereby claim:

  • I am elgreg on github.
  • I am elgreg (https://keybase.io/elgreg) on keybase.
  • I have a public key whose fingerprint is 8E84 80F7 57BE ACB6 E352 D0DA 5417 4FB2 9BF0 2CAD

To claim this, I am signing this object:

@elgreg
elgreg / get_all_tweets.sh
Last active April 19, 2019 13:48
Get all the tweets in a thread starting at the end
#!/usr/bin/env bash
START=$1
CURRENT="${START}"
mkdir $START
download_tweet () {
twurl "/1.1/statuses/show/${CURRENT}.json" > "${START}/${1}.json"
}
@elgreg
elgreg / get_all_tweets.sh
Created April 19, 2019 11:13
Get all the tweets in a thread starting at the end
#!/usr/bin/env bash
START=$1
CURRENT="${START}"
mkdir $START
download_tweet () {
twurl "/1.1/statuses/show/${CURRENT}.json" > "${START}/${1}.json"
}
export DOCKER_FOR_MAC_IP=`docker run alpine ping -n -q -c 1 docker.for.mac.localhost | grep -o -E [0-9^/]+\.[0-9^/]+\.[0-9^/]+\.[0-9^/]+ | head -n 1 | xargs echo -n
#! /bin/bash
# Requires imagemagick (brew install imagemagick)
# Usage:
# ./pad_to_3_x_2.sh [image-name]
#
# produces resized-[image-name]
#
# Example:
@elgreg
elgreg / contentscript.js
Created November 8, 2017 18:42
The contenscript behind the 140 extension for Twitter by Slate
'use strict';
$(document).ready(function(){
var styles = '<style> .twttr140RadialRed { color:red !important; stroke:red !important;} </style>';
$('head').append(styles);
var $tweetModal = $('.modal-tweet-form-container .RichEditor-scrollContainer');
var $homeTimeLine = $('#tweet-box-home-timeline');
var tweetMax = 140;
while true; do wget "https://public.dmv.washingtondc.gov/waitwatch/95m2/video.jpg"; sleep 35; kill -0 "$$" || exit; done 2>/dev/null &
<div class="flag">
<div class="stars">
<div class="star star-first">
<div class="star-arrow star-arrow-one"></div>
<div class="star-arrow star-arrow-two"></div>
<div class="star-arrow star-arrow-three"></div>
</div>
<div class="star">
<div class="star-arrow star-arrow-one"></div>
<div class="star-arrow star-arrow-two"></div>
@elgreg
elgreg / Spoiler
Last active December 14, 2015 14:58
The answers to google's io game - Spoiler alert!
Go to https://developers.google.com/events/io/
In the console find the app.min.js, then find anything inside of the anonymous function that has this.patternMatcher.
Set a breakpoint.
Refresh.
var p = this.patternMatcher_.matchers_;
for(var _p in p){ if(p[_p].isPartial === false){ console.log(p[_p]); }};

Keybase proof

I hereby claim:

  • I am elgreg on github.
  • I am elgreg (https://keybase.io/elgreg) on keybase.
  • I have a public key whose fingerprint is 3D74 2DDC F068 E1F5 B46D CEFE 9E90 568A 0502 F469

To claim this, I am signing this object: