Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View sdras's full-sized avatar

Sarah Drasner sdras

View GitHub Profile
@CristinaSolana
CristinaSolana / gist:1885435
Created February 22, 2012 14:56
Keeping a fork up to date

1. Clone your fork:

git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
@ddprrt
ddprrt / Gulpfile.js
Last active May 8, 2020 21:11
Gulp: Grabbing JavaScript assets from a CDN to add to your build pipeline
var gulp = require('gulp');
var source = require('vinyl-source-stream');
var request = require('request');
var merge = require('merge2');
var concat = require('gulp-concat');
var buffer = require('gulp-buffer');
/**
* 1. We request the latest jQuery version from the jQuery CDN. The
* request package allows for streaming. What we get in return
@jevakallio
jevakallio / reactiveconf-slam-poetry.md
Last active July 7, 2021 19:57
#ReactiveConf 2017 Lightning Talk Submission: JavaScript Slam Poetry

TL;DR: If you want to see me perform a spoken word poem about JavaScript in front of 1000 people (and on video), please ⭐ star this gist. If you're on mobile, you'll need to request desktop site.

JavaScript Slam Poetry

Javascript! Slam! Poetry!

@siddharthkp
siddharthkp / reactivconf-2017-proposal.md
Last active February 25, 2024 10:06
Building applications for the next billion users

gif-from-tweet

There are so many great GIFs out there and I want to have copies of them. Twitter makes that harder than it should be by converting them to MP4 and not providing access to the source material. To make it easier, I made a bash pipeline that takes a tweet URL and a filename, extracts the MP4 from that tweet and uses ffmpeg to convert back to GIF.

Dependencies

  • ffmpeg
    • macOS: brew install ffmpeg
    • Ubuntu/Debian: apt install ffmpeg
function isValidJSON(text) {
try {
JSON.parse(text);
return true;
} catch {
return false;
}
}
// This produces invalid ECMAScript String (before ES2019):
eval('"\u2028"');
// This is invalid as well:
eval('"\u2029"');
@vakila
vakila / SingleArrow.ipynb
Created April 12, 2019 07:23
Anjana Vakil, "The Universe in a Single Arrow", JSHeroes 2019
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@philhawksworth
philhawksworth / freecodecamp_intro_to_jamstack.md
Last active June 26, 2021 20:37
freeCodeCamp - Introduction to JAMstack

freeCodeCamp Introduction to JAMstack

Here's a list of links to resources to accompany the "Introduction to JAMstack" video on freeCodeCamp, by Phil Hawksworth

Watch the video

JAMstack video

@alanbsmith
alanbsmith / peach-thyme-bourbon-infusion.md
Created August 27, 2021 23:59
Peach Thyme Bourbon Cocktail 🥃

Peach Thyme Bourbon Cocktail

Infusion

Ingredients

  • 2 cups high-proof bourbon (I like Knob Creek)
  • 1 peach
  • a few small fresh thyme sprigs