I hereby claim:
- I am AlanGreene on github.
- I am alangreene (https://keybase.io/alangreene) on keybase.
- I have a public key whose fingerprint is 9052 081F 91C1 81BB 2CF3 B16C F20F 197F 61B0 D3C5
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
Custom recipe to get macOS 10.12 Sierra running from scratch, setup applications and developer environment. This is very similar (and currently mostly the same) as my 10.11 El Capitan setup recipe and 10.10 Yosemite setup recipe. I am currently tweaking this for 10.12 Sierra and expect to refine this gist over the next few weeks.
I use this gist to keep track of the important software and steps required to have a functioning system after a semi-annual fresh install. I generally reinstall each computer from scratch every 6 months, and I do not perform upgrades between releases.
This keeps the system performing at top speeds, clean of trojans, spyware, and ensures that I maintain good organizational practices for my content and backups. I highly recommend this.
You are encouraged to fork this and modify it to your heart's content to match your o
// ==UserScript== | |
// @name Dictionary | |
// @version 0.1 | |
// @author Sindre Sorhus | |
// @include * | |
// ==/UserScript== | |
document.documentElement.style.webkitFilter='blur(0.5px)'; |
// from @kentcdodds | |
beforeEach(() => { | |
jest.spyOn(window, 'fetch').mockImplementation((...args) => { | |
console.warn('window.fetch is not mocked for this call', ...args); | |
throw new Error('This must be mocked!'); | |
}); | |
}); | |
afterEach(() => { | |
window.fetch.mockRestore(); |
// from @PhilippSpiess | |
if (process.env.NODE_ENV === 'development') { | |
const originalCreateElement = React.createElement; | |
React.createElement = function(...args) { | |
if (Math.random() < 0.001) { // adjust as desired | |
throw Error('A random error ocurred. Did an error boundary properly catch it?'); | |
} | |
return originalCreateElement.call(React, ...args); | |
}; |
const { execSync } = require('child_process') | |
const { createHash } = require('crypto') | |
const invertColor = require('invert-color') | |
const branchName = execSync('git rev-parse --abbrev-ref HEAD') | |
const hash = createHash('sha256') | |
hash.update(branchName) | |
const color = '#' + hash.digest().toString('hex').substring(0, 6) | |
const invertedColor = invertColor(color, true) |
#!/usr/bin/env bash | |
source "./dock_functions.sh" | |
declare -a apps=( | |
'/System/Applications/Utilities/Terminal.app' | |
'/System/Applications/Music.app' | |
'/Applications/Google Chrome.app' | |
'/Applications/PhpStorm.app' | |
'/Applications/Visual Studio Code.app' |
// If the user has been on the page for over 12 hours, the next link | |
// click will do a full page transition to get new code | |
import React from "react"; | |
import { BrowserRouter, useLocation } from "react-router-dom"; | |
let hour = 3600000; | |
export default function StaleAppRouter(props) { | |
let [isStale, setIsStale] = useState(false); |