git clone git@github.com:branneman/dotfiles.git ~/.dotfiles
ln -s ~/.dotfiles/vscode-settings.json "~/Library/Application Support/Code/User/settings.json"
- Open the Command Palette (
⌘
+⇧
+P
)
// | |
// hasPosition trait | |
// | |
const hasPosition = state => ({ | |
setPosition: function(x, y) { | |
this.x = x; | |
this.y = y; | |
}.bind(state) | |
}); |
function dump($var) { | |
ob_start(); | |
var_dump($var); | |
$output = ob_get_clean(); | |
echo preg_replace("/=>(\s+)/m", ' => ', $output); | |
} |
#!/usr/bin/env node | |
const fetch = require('node-fetch') | |
const ip = require('ip') | |
const os = require('os') | |
const env = require('./.env.json') | |
const endpoint = 'https://dns.api.gandi.net/api/v5/' | |
const newip = `${ip.address()}` | |
const domain = env.domain |
/** | |
* This function polls the component's props for Apollo to set `props.data.loading` to `false` | |
* @example | |
* await waitDuringLoadingState(testRenderer, TodoContainer) | |
* @see {@link https://reactjs.org/docs/test-renderer.html} | |
* @param {TestRenderer} testRenderer | |
* @param {React.Component} testComponent | |
* @returns {Promise} | |
*/ | |
export function waitDuringLoadingState(testRenderer, testComponent) { |
var fs = require('fs'), | |
exec = require('child_process').exec, | |
express = require('express'), | |
app = express(); | |
app.get('/static/img/*.svg.*.png', function(req, res) { | |
var pngFile = 'src' + req.url, | |
svgFile = pngFile.substring(0, pngFile.indexOf('.svg') + 4); | |
if (!fs.existsSync(svgFile)) { | |
return res.render('404', { |
$(function() { | |
var resizeEnd; | |
$(window).on('resize', function() { | |
clearTimeout(resizeEnd); | |
resizeEnd = setTimeout(function() { | |
$(window).trigger('resize-end'); | |
}, 100); | |
}); | |
}); |
/** | |
* Turing Machine Interpreter | |
* | |
* Features: | |
* - Infinite tape, both ways | |
* - Uses JS values, anything that matches ==, is a valid symbol | |
* | |
* Definition: | |
* - States (Q): { integer, halt } | |
* - Input symbols read/write (Σ): any integer or string |
/** | |
* Set the breakpoints as a font-family and pseudo element. | |
* This way JavaScript can read the current active breakpoint. | |
*/ | |
head { | |
font-family: 'no-breakpoint'; | |
} | |
body:after { | |
display: none; | |
content: 'no-breakpoint'; |