Skip to content

Instantly share code, notes, and snippets.

View spadgos's full-sized avatar
🕶️
I will be slow to respond, if at all.

Nick Fisher spadgos

🕶️
I will be slow to respond, if at all.
View GitHub Profile
@spadgos
spadgos / gist:8097529
Last active March 22, 2021 21:28
Basic rebase and merge flow

Merging feature branches with rebase:

  1. git checkout master
  2. git pull --rebase to make sure you have the latest version of master
  3. git checkout feature/my-branch
  4. git rebase master ... to rebase this branch from master
    1. Optionally, git push --force to update the branch on github. This is useful for making sure it closes a pull request properly.
  5. git checkout master
  6. git merge --no-ff feature/my-branch ... merge the branch into master, making sure there's a merge commit
@spadgos
spadgos / gist:4697069
Created February 2, 2013 12:24
Get your SoundCloud likes as a .pls file (Paste this in the console on soundcloud.com)
$.getJSON('e1/me/track_likes.json?limit=200').done(function (likes) {
var list = likes.map(function (like, i) {
i++;
var sound = like.track;
return [
'File' + i + '=' + sound.stream_url + "?client_id=" + require('config').get('client_id'),
'Title' + i + '=' + sound.title,
'Length' + i + '=' + Math.round(sound.duration / 1000)
].join('\n');
@spadgos
spadgos / gist:1427918
Created December 3, 2011 19:38
Broken lift
Disclaimer: We are not affiliated with GitHub in any way!
Random Hacks of Kindness Berlin, Dec 2011 #RHoKbln
Project: Broken Lifts
Next steps:
Backend team
create database with static data
@spadgos
spadgos / bookmarklet.txt
Last active March 21, 2018 12:05 — forked from anonymous/random-task.js
Output a list of random task titles
javascript:(function()%7Bconst adverbs %3D %5B'abruptly'%2C 'actively'%2C 'badly'%2C 'beautifully'%2C'briskly'%2C 'brutally'%2C 'carefully'%2C 'cheerfully'%2C'circularly'%2C 'clearly'%2C 'collectively'%2C 'comfortably'%2C'considerably'%2C 'continuously'%2C 'courageously'%2C 'crazily'%2C'creatively'%2C 'creditably'%2C 'dangerously'%2C 'delicately'%2C'delightfully'%2C 'destructively'%2C 'differently'%2C 'endlessly'%2C'enviously'%2C 'eternally'%2C 'expectedly'%2C 'expertly'%2C'financially'%2C 'firmly'%2C 'forcefully'%2C 'gloriously'%2C'growingly'%2C 'harmfully'%2C 'hatefully'%2C 'healthily'%2C'hopefully'%2C 'imitatively'%2C 'impressively'%2C 'inclusively'%2C'indicatively'%2C 'injuriously'%2C 'insultingly'%2C 'intentionally'%2C'irritatingly'%2C 'leadingly'%2C 'lightly'%2C 'livingly'%2C'madly'%2C 'massively'%2C 'monotonously'%2C 'movingly'%2C'powerfully'%2C 'quickly'%2C 'randomly'%2C 'sadly'%2C'securely'%2C 'sloppily'%2C 'sorrowfully'%2C 'speedily'%2C'truthfully'%2C 'uneasily'%2C 'wearily'%2C 'weirdly'%2C'wholehea
/*
Below is an incomplete snippet of code which is used to implement the Lazy Require Calls
method described here http://spadgos.github.io/rupy13/#/29
Basically, it takes an AST like this:
var Foo = require('foo');
function bar() {
Foo.quux();
}
@spadgos
spadgos / 01 - before.html
Last active December 28, 2015 04:58
tenXer dashboard content
<div class="dashModContainer">
<div class="box dashModContent">
<div class="boxHead row subBelow">
<div class="span11 dashModDrag">
<h2 class="dashModTitle">
Lines Modified
</h2>
</div>
<div class="span1 configureContainer">
<button type="button" class=" dashModConfigure configureModule bare icon-gear mini iconText" data-form-url="/dashboard/modules/AX5LGVBXVMK94GXREDACTEDFSCUCYRFCSQOZVA/edit/">
@spadgos
spadgos / gist:6534696
Created September 12, 2013 08:55
Acorn AST sample
_.bar()
{
"0": {
"type": "CallExpression",
"start": 0,
"end": 7,
"callee": {
"type": "MemberExpression",
"start": 0,
"end": 5,
@spadgos
spadgos / SublimeLinter.sublime-settings
Created November 29, 2012 17:09
sublimelint.json
{
"csslint_options": {
"adjoining-classes": false
},
"jshint_options": {
"asi": false,
"bitwise": true,
"boss": false,
"browser": true,
"curly": true,
@spadgos
spadgos / Default (Linux).sublime-keymap
Created October 17, 2012 08:19
Three window split in SublimeText
{
"keys": ["alt+shift+6"],
"command": "set_layout",
"args":
{
"cols": [0.0, 0.5, 1.0],
"rows": [0.0, 0.5, 1.0],
"cells":
[
[0, 0, 1, 2], [1, 0, 2, 1],
@spadgos
spadgos / gist:3508685
Created August 29, 2012 08:45
pacmd, list-sinks output
$ pacmd
Welcome to PulseAudio! Use "help" for usage information.
>>> list-sinks
1 sink(s) available.
* index: 0
name: <alsa_output.pci-0000_00_1b.0.analog-stereo>
driver: <module-alsa-card.c>
flags: HARDWARE HW_MUTE_CTRL HW_VOLUME_CTRL DECIBEL_VOLUME LATENCY DYNAMIC_LATENCY
state: SUSPENDED
suspend cause: IDLE