Skip to content

Instantly share code, notes, and snippets.

View rupl's full-sized avatar
💭
¯\_(ツ)_/¯

Chris Ruppel rupl

💭
¯\_(ツ)_/¯
View GitHub Profile
@rupl
rupl / .zshrc
Last active August 29, 2015 14:02 — forked from SlexAxton/.zshrc
GIF workflow for OS X Mavericks 10.9 and Homebrew 0.9.5 — lovingly adapted from https://gist.github.com/SlexAxton/4989674
gifify() {
if [[ -n "$1" ]]; then
if [[ $2 == '--good' ]]; then
ffmpeg -i $1 -r 10 -vcodec png out-static-%05d.png
time convert -verbose +dither -layers Optimize -resize 600x600\> out-static*.png GIF:- | gifsicle --colors 128 --delay=5 --loop --optimize=3 --multifile - > $1.gif
rm out-static*.png
else
ffmpeg -i $1 -s 600x400 -pix_fmt rgb24 -r 10 -f gif - | gifsicle --optimize=3 --delay=3 > $1.gif
fi
else
@chriseppstein
chriseppstein / word_count.rb
Created October 16, 2010 15:57
counts words for an article I'm writing
#!/usr/bin/env ruby
require 'rdiscount'
require 'nokogiri'
words = 0
content = $stdin.read
html = RDiscount.new(content).to_html
doc = Nokogiri::HTML(html)
@danro
danro / Custom.css
Created September 16, 2012 17:32
Improved webkit inspector toolbar
#-webkit-web-inspector #toolbar {
background: #cdcdcd !important;
height: 36px !important;
}
#-webkit-web-inspector #main {
top: 36px !important;
}
#-webkit-web-inspector .toolbar-item.elements:hover:after {
content: "elements";
z-index: 9999;
@rickycodes
rickycodes / shrug.sh
Last active November 23, 2015 17:45
idk() {
local shrugs=("¯\_(ツ)_/¯" "¯\(°_°)/¯" "¯\(°_o)/¯" "┐(°_°)┌")
local shrug=${shrugs[$RANDOM % ${#shrugs[@]}]}
pbcopy <<< "${shrug}" && echo "${shrug} copied to clipboard"
}
alias shrug=idk
@marcusandre
marcusandre / gen_appcache.md
Last active December 15, 2015 07:59
Generate Appcache (incl. xhr) in Chrome DevTools

Generate Appcache Manifest (incl. xhr) in Chrome DevTools

  1. Open your Chrome Developer Tools
  2. Navigate to the Network tab
  3. Just right click into the panel and choose Copy ALL as HAR (maybe the page needs a reload)
  4. Switch to the console tab and save your HAR data in a variable. (var data = cmd + v)
  5. Now let's create the cache manifest:
console.log('CACHE MANIFEST\n\nCACHE:');
@getify
getify / gist:5534537
Created May 7, 2013 17:41
Offer for JS, HTML5, and general/other developer meetups

I've launched a kickstarter for a book series titled "You Don't Know JS", to explore the "tough parts" of JS and help the language make more sense to developers who use it.

You Don't Know JS" is an exploration of the mysterious, confusing, complex, and controversial parts of JavaScript.

If you write JavaScript for your primary job, odds are, you're pretty good at it. But honestly, how well do you really know the language? Most of us, myself included, spend years writing JS and never really going beyond a surface understanding. And then we blame our WTF moments on "the bad parts".

This book series will examine the things that trip up or confound even the most seasoned of JS devs. And I was one of them until (recently) I spent enough time poking at the tough parts to understand them. Now I want to help other devs have those "a-ha!" moments, too!

What if you could really deeply know how JS works? Would that change how you

@colestrode
colestrode / audit.sh
Last active May 20, 2018 20:30
Lint on commit, audit on push
#!/bin/bash
# This will automatically run npm audit fix on your branch and commit the changes with a commit message that includes the current branch name
# It will not run on develop or master branches
# You can skip it on other branches with the --no-verify command line option: git push origin branch --no-verify
BRANCH=`git rev-parse --abbrev-ref HEAD`
MESSAGE="$BRANCH npm audit fix"
if [[ $BRANCH = 'master' ]] || [[ $BRANCH = 'develop' ]] ; then
echo 'skipping audit on '$BRANCH' branch'
exit 0
@jasonbellamy
jasonbellamy / modal-with-outline-overlay.css
Created February 26, 2015 22:52
Modal overlay created using CSS outline property.
.modal {
background: black;
color: rgb(255, 255, 255);
height: 200px;
left: 50%;
position: relative;
text-align: center;
top: 50%;
transform: translate(-50%, 50%);
width: 200px;
@cafuego
cafuego / 2842739-14.patch
Created August 17, 2018 08:46
PWA module 404 fix
diff --git a/pwa.module b/pwa.module
index a87172b..fe22fe9 100644
--- a/pwa.module
+++ b/pwa.module
@@ -27,7 +27,7 @@ function pwa_permission() {
function pwa_menu() {
$items = [];
- $items['pwa/serviceworker.js'] = [
+ $items['pwa/serviceworker/js'] = [
@paulirish
paulirish / gist:3098860
Created July 12, 2012 15:26
Open Conference Expectations

Open Conference Expectations

This document lays out some baseline expectations between conference speakers and conference presenters. The general goal is to maximize the value the conference provides to its attendees and community and to let speakers know what they might reasonably expect from a conference.

We believe that all speakers should reasonably expect these things, not just speakers who are known to draw large crowds, because no one is a rockstar but more people should have the chance to be one. We believe that conferences are better -- and, dare we say, more diverse -- when the people speaking are not just the people who can afford to get themselves there, either because their company paid or they foot the bill themselves. Basically, this isn't a rock show rider, it's some ideas that should help get the voices of lesser known folks heard.

These expectations should serve as a starting point for discussion between speaker and organizer. They are not a list of demands; they are a list of rea