-
Install the React Developer Tools Chrome Extension.
-
Go to the egghead website, i.e. Getting Started with Redux
-
Click
View -> Developer -> Javascript Console
, then theReact
tab, then the<NextUpLessonList ...>
tag. -
Click back to the
Console
tab, then run:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ruby herokuspeed.rb > herokuspeed.html && open herokuspeed.html | |
require 'pry' | |
require 'descriptive_statistics' | |
require 'erb' | |
# require 'open3' | |
def time_exec(cmd) | |
start = Time.now | |
`#{cmd}` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// gist_id: 5dd142a99f1c82cbfc94 | |
// hook_url: https://hook.io/christiangenco/twilio | |
// url: http://sms.gen.co/?body="hi" | |
module['exports'] = function(hook) { | |
var client = require('twilio')(hook.env['TWILIO_SID'], hook.env['TWILIO_AUTH']); | |
client.sendMessage({ | |
// to: hook.params.to || '+18177977334', | |
to: '+18177977334', | |
from: '+18176685965', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
<script type="text/javascript" src="http://code.jquery.com/jquery-2.1.4.min.js" ></script> | |
<title>AJAX Signup</title> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css"> | |
<!-- Optional theme --> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap-theme.min.css"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/ruby | |
# invoke on a regular schedule (like once a day) with: | |
# /path/to/trashold.rb ~/Downloads | |
# to automatically trash files older than 1.5 days. | |
require 'fileutils' | |
include FileUtils | |
THRESHOLD = 1.5 * (60 * 60 * 24) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# First you need to know the name of your TrueCrypt disk. In this example, after running the `diskutil list` command, | |
# you can see that my 2TB TrueCrypt disk is mounted at /dev/disk2, and the encrypted partition is named "disk2s1" | |
# (see the IDENTIFIER column). That's the name I need to use in the ruby script. | |
$ diskutil list | |
/dev/disk0 | |
#: TYPE NAME SIZE IDENTIFIER | |
0: GUID_partition_scheme *251.0 GB disk0 | |
1: EFI EFI 209.7 MB disk0s1 | |
2: Apple_CoreStorage 250.1 GB disk0s2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# If you, like me, have always known about this `awk` thing | |
# when stealing one liners from Stack Overflow but always put | |
# off actually learning it, here's your 10 second lesson: | |
# Print lines in FILENAME that match pattern (the $0 is a | |
# variable that refers to the entire line, and can be omitted | |
# by default): | |
$ awk '/pattern/{print $0}' FILENAME | |
# ex: find all words that start with a capital A in the dictionary: |
Like in belIEve, fIErce, collIE, dIE, or frIEnd.
But flip "ie" if it's after C, like in deCEIve, CEIling, reCEIpt, or CEIlidh.
There are a few exceptions to this rule, though, like in speCIEs, sCIEnce, suffiCIEnt, or sEIze, wEIrd, vEIn, thEIr, forEIgn, or fEIsty.
In fact, in the default dictionary for Mac OS X 10.10, there are 2717 exceptions to this rule, and only 3901 words that follow it (full list below).
In other words: if you're trying to decide if a word should be spelled with "ie" or "ei," following this rule will only help you guess correctly 6 times out of 10.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// log in to https://istation.com, navigate to your classroom (https://secure.istation.com/Classroom/Index/CLASSROOM_ID), | |
// then cut and paste the following into your URL bar and hit enter. | |
javascript:function changePassword(a){var b=document.createElement("IFRAME");b.setAttribute("src",a),b.style.width="100%",b.style.height="100%",b.style.position="fixed",b.style.top=0,b.onload=function(){console.log("loaded");var a=$(this);if(a.contents().find("h3.lead").length)a.remove(),urls.length>0&&changePassword(urls.pop());else{var b=a.contents().find("#Username").val(),c=b.match(/\d+/)[0];a.contents().find("#Password").val(c),a.contents().find("form[action*='/Student/Edit/']").submit()}},document.body.appendChild(b)}window.urls=$(".entity-list .ctxt-menu-target a").map(function(a,b){return"https://secure.istation.com"+$(b).attr("href").replace("Index","Edit")}).toArray(),changePassword(urls.pop()); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Add Post Table to Kid Blog | |
// @namespace http://christian.gen.co/ | |
// @version 0.1 | |
// @description Adds a table showing how many comments each kid has added to each post. | |
// @author Christian Genco | |
// @match http://kidblog.org/*/wp-admin/users.php | |
// @grant none | |
// @require http://code.jquery.com/jquery-latest.js | |
// ==/UserScript== |