This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
enum ConfigType { | |
case primaryFont(UIFont) | |
case secondaryFont(UIFont) | |
case tertiaryFont(UIFont) | |
case primaryLabelColor(UIColor) | |
case secondaryLabelColor(UIColor) | |
case tertiaryLabelColor(UIColor) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
terse_git_prompt_info () { | |
local ref | |
if [[ "$(command git config --get oh-my-zsh.hide-status 2>/dev/null)" != "1" ]] | |
then | |
ref=$(command git symbolic-ref HEAD 2> /dev/null) || ref=$(command git rev-parse --short HEAD 2> /dev/null) || return 0 | |
echo "(%{\x1b[31m%}${ref#refs/heads/}$(parse_git_dirty)$ZSH_THEME_GIT_PROMPT_SUFFIX" | |
fi | |
} | |
export PS1=$' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
U-Boot 2010.06.05 (Jul 08 2018 - 22:45:33) | |
CPU: AMCC PowerPC 460EX Rev. B at 1150 MHz (PLB=230 OPB=115 EBC=115) | |
No Security/Kasumi support | |
Bootstrap Option A - Boot ROM Location EBC (8 bits) | |
Internal PCI arbiter disabled | |
32 kB I-Cache 32 kB D-Cache | |
Board: Sam460ex, PCIe 4x + SATA-2 | |
I2C: ready | |
DRAM: 512 MiB (ECC not enabled, 460 MHz, CL0) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* A function that will allow the presence of a function in the place of a | |
* value that can, instead generate the value. Any function supplied will | |
* use `this` bound to `functionOrValue()` as the `this` value for the | |
* supplied function; unless, of course, the supplied function is a big | |
* arrow function that cannot be rebound. | |
* | |
* @param {Function|mixed} fnOrVal either a function or value | |
* @param {Array<mixed>} args an array of input that will be passed to any | |
* supplied function and ignored otherwise |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Creates an array with several notable properties. Given several strings, | |
* the array will be indexed by both name and number. Some of the notable | |
* properties added to the resulting array are as follows: | |
* | |
* Functions: | |
* ``` | |
* data() - supplied with the index or string, any associated data objects | |
* will be returned. 'data()' will only exist if there is no | |
* such key. A synonym key __data__ will also be set. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env node | |
let spawn = require('child_process').spawn | |
let path = require('path') | |
let fs = require('fs') | |
// --------------------------------------------------------------------------- | |
// BEGIN: Setup data | |
// --------------------------------------------------------------------------- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let { combine, deepmerge } = (() => { | |
function isMergeableObject(value) { | |
return isNonNullObject(value) | |
&& !isSpecial(value) | |
} | |
function isNonNullObject(value) { | |
return !!value && typeof value === 'object' | |
} | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* If the value supplied is actually a number, basically finite values that | |
* can be parsed as floats and are not `NaN` will cause this function to | |
* return true | |
* | |
* @param {mixed} value any value that should be tested for numberhood | |
* | |
* @return {Boolean} true if the value is not `NaN` and can be parsed as | |
* a float | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rem see https://github.com/coreybutler/nvm-windows/issues/300 | |
@echo off | |
SETLOCAL EnableDelayedExpansion | |
if [%1] == [] ( | |
echo Pass in the version you would like to install, or "latest" to install the latest npm version. | |
) else ( | |
set wanted_version=%1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Patch Function.prototype to provide the signature in the REPL | |
Object.defineProperty( | |
Function.prototype, | |
'signature', | |
{ | |
get() { | |
let source = this.toString() | |
// For classes we need to extract the signature of the | |
// constructor function within; so use some regular |