As configured in my dotfiles.
start new:
tmux
start new with session name:
As configured in my dotfiles.
start new:
tmux
start new with session name:
Ever had the need to create a branch in a repo on Github without wanting (or being able) to access a local repo?
With the aid of [the Github API][1] and any online request app this is a piece of cake!
Just follow these steps:
https://api.github.com/repos/<AUTHOR>/<REPO>/git/refs/heads
https://api.github.com/repos/<AUTHOR>/<REPO>/git/refs
with the following as the POST body :Sometimes you want to have a subdirectory on the master
branch be the root directory of a repository’s gh-pages
branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master
branch alongside the rest of your code.
For the sake of this example, let’s pretend the subfolder containing your site is named dist
.
Remove the dist
directory from the project’s .gitignore
file (it’s ignored by default by Yeoman).
#!/usr/bin/ruby | |
# Create display override file to force Mac OS X to use RGB mode for Display | |
# see http://embdev.net/topic/284710 | |
require 'base64' | |
data=`ioreg -l -d0 -w 0 -r -c AppleDisplay` | |
edids=data.scan(/IODisplayEDID.*?<([a-z0-9]+)>/i).flatten | |
vendorids=data.scan(/DisplayVendorID.*?([0-9]+)/i).flatten |
<!doctype html> | |
<html class="no-js"> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<title></title> | |
<meta name="description" content=""> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<link rel="stylesheet" href="public/css/main.css"> |
/* | |
example: | |
var map = [ [0,0,0,0,0,1,1,0], | |
[0,0,0,0,1,0,0,0], | |
[0,1,1,0,1,0,0,0], | |
[0,0,0,0,1,0,1,0], | |
[0,1,1,0,0,0,1,0], | |
[0,0,0,0,0,0,1,0] ]; | |
var start = {x:0, y:0}; | |
var goal = {x:7, y:4}; |
/** | |
* Retrieves a (deeply) nested value from an object. | |
* A tiny implementation of lodash.get. | |
* | |
* Tests: | |
* https://codesandbox.io/s/48052km1q7 | |
* | |
* Perf tests: | |
* https://jsperf.com/get-try-catch-vs-reduce-vs-lodash-get | |
* |
#!/bin/bash | |
# Generate a `:something-intensifies:` Slack emoji, given a reasonable image | |
# input. I recommend grabbing an emoji from https://emojipedia.org/ | |
set -euo pipefail | |
# Number of frames of shaking | |
count=10 | |
# Max pixels to move while shaking |
/** | |
* Modified from: | |
* https://github.com/react-spring/react-spring/blob/master/src/animated/createInterpolator.ts | |
*/ | |
function clamp(value, min, max) { | |
return Math.max(min, Math.min(max, value)); | |
} | |
export function findRange(input, inputRange) { |