Skip to content

Instantly share code, notes, and snippets.

@chaseadamsio
chaseadamsio / ga-grab.js
Created Oct 19, 2014
Quick snippet for getting google analytics urls from Behavior : Site Content : All Pages
View ga-grab.js
Array.prototype.forEach.call(document.querySelectorAll("._GARL"),
function(i) {
console.log(i.innerHTML);
});
@chaseadamsio
chaseadamsio / coursera-to-todoist.js
Created Dec 13, 2014
Convert Coursera Lecture List to Todoist
View coursera-to-todoist.js
var lectures = Array.prototype.slice.call(document.querySelectorAll('.lecture-link'));
var todoistCollection = [];
lectures.forEach(function(lecture) {
var todoistEntry = lecture.href + ' (' + lecture.innerHTML.replace('\n', '') + ')';
todoistCollection.push(todoistEntry);
});
todoistCollection.join("\n");
@chaseadamsio
chaseadamsio / mjs101.week1.txt
Created Jan 8, 2015
MongoJS 101 Week 1 Todoist Template
View mjs101.week1.txt
https://university.mongodb.com/courses/10gen/M101JS/2015_January/courseware/Week_1_Introduction/5245b269e2d42346975228c9/ (Week 1: Welcome to M101JS)
https://university.mongodb.com/courses/10gen/M101JS/2015_January/courseware/Week_1_Introduction/5245b269e2d42346975228c9/ (Week 1: Welcome to M101JS) @quiz
https://university.mongodb.com/courses/10gen/M101JS/2015_January/courseware/Week_1_Introduction/524af6b2e2d4235f73b619ee/ (Week 1: What is MongoDB?)
https://university.mongodb.com/courses/10gen/M101JS/2015_January/courseware/Week_1_Introduction/524af6b2e2d4235f73b619ee/ (Week 1: What is MongoDB?) @quiz
https://university.mongodb.com/courses/10gen/M101JS/2015_January/courseware/Week_1_Introduction/52530600e2d4237f053e42ad/ (Week 1: MongoDB Relative to Relational)
https://university.mongodb.com/courses/10gen/M101JS/2015_January/courseware/Week_1_Introduction/52530600e2d4237f053e42ad/ (Week 1: MongoDB Relative to Relational) @quiz
https://university.mongodb.com/courses/10gen/M101JS/2015_January/courseware/
@chaseadamsio
chaseadamsio / 7-habits-be-proactive.md
Created Apr 2, 2015
Thoughts about Habit 1: Be Proactive
View 7-habits-be-proactive.md

To Live Proactively

I'm rereading 7 Habits of Highly Effective People and in reading the chapter on the first private victory habit (Be Proactive) I stumbled into a gold mine of excerpts that resonated with me where I am today.

Our unique human endowments lift us above the animal world. The extent to which we exercise and develop these endowments empowers us to fulfill our uniquely human potential. Between stimulus and response is our greatest power — the freedom to choose. (p 78)

Gut punch 1: stimulus and response are guaranteed, our response is a result of our freedom to choose.

It [proactivity] means that as human beings, we are responsible for our own lives. Our behavior is a function of our decisions, not our conditions (p 78)

View webpack.config.js
var path = require('path');
var ExtractTextPlugin = require('extract-text-webpack-plugin');
var HtmlWebpackPlugin = require('html-webpack-plugin');
var webpack = require('webpack');
module.exports = {
resolve: {
modulesDirectories: ['node_modules', 'sass'],
extensions: ['', '.json', '.jsx', '.js']
},
@chaseadamsio
chaseadamsio / _resets.sass
Last active Dec 15, 2015
Eric Meyers' CSS Reset v2.0 & Chris Coyier's group clearfix & Paul Irishes box layout model SASSified
View _resets.sass
/**
* Eric Meyer's Reset CSS v2.0 (http://meyerweb.com/eric/tools/css/reset/)
* http://cssreset.com
*/
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, img, ins, kbd, q, s, samp,
small, strike, sub, sup, tt, var,
u, center,
View box-layout-model.sass
/* apply a natural box layout model to all elements */
*
-moz-box-sizing: border-box
-webkit-box-sizing: border-box
box-sizing: border-box
@chaseadamsio
chaseadamsio / chase.bashrc
Created Mar 20, 2013
General bashrc sourced from my bash_profile
View chase.bashrc
#!/bin/bash
# This is my general bashrc that I source into bash_profile.
# Why you ask? Good question: Because I have more than one computer that
# I use terminal and vim on and the bash_profiles on both of them have totally
# different aliases for directory hotswitching and other commands.
# For some reason this is required for the PS1 to work with __git_ps1
PATH="/usr/local/bin:${PATH}"
if [ -f `brew --prefix`/etc/bash_completion ]; then
. `brew --prefix`/etc/bash_completion
View alias_rtfm
#Because it's more fun this way.
alias rtfm="man"
@chaseadamsio
chaseadamsio / jekyll_highlight_mod.rb
Last active Dec 20, 2015
A script to modify Jekyll's highlight class. Updated for Jekyll 1.0.3 from this blog post: http://thanpol.as/jekyll/jekyll-code-highlight-and-line-numbers-problem-solved/
View jekyll_highlight_mod.rb
# Working as of Jekyll 1.0.3
module Jekyll
class WrapHighlightBlock < Jekyll::Tags::HighlightBlock
def initialize(tag_name, markup, tokens)
super
end
def render(context)
'<figure class="code"><figcaption></figcaption>' + super + '</figure>'