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
#!/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
/** | |
* 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
/** | |
* 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
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
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
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
/* | |
Small sample script designed to use JavaScript, with Chrome, to pull the actual | |
RGB values out of the sample theme images located in the iTerm2 Color Schemes repo | |
https://github.com/mbadolato/iTerm2-Color-Schemes | |
To use, navigate to the page above, copy this entire file to the clipboard, open | |
the developer console (Ctrl-Shift-i and select console, like Command-Shift-i on | |
macs) and paste the contents into that window. | |
For the most part, theme image file names are the theme name in snake case, such |
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 java.io.BufferedOutputStream; | |
import java.io.IOException; | |
import java.io.OutputStream; | |
import java.net.InetSocketAddress; | |
import java.util.Map; | |
import java.util.regex.Pattern; | |
import javax.sound.sampled.SourceDataLine; | |
import java.util.regex.Matcher; |
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
#!/bin/bash | |
if [[ "--help" = "$1" ]]; then | |
printf "Usage: ${0} [Message] [Yes] [No] [Yy]\n" | |
printf " Message - Defaults to \"Are you sure? \"\n" | |
printf " (notice the space at the end)\n" | |
printf " Yes - Positive message defaults to Yes\n" | |
printf " No - Negative message defaults to No\n" | |
printf " Yy - Letters to use for possitive message\n\n" | |
printf " Positive messages exit with 0, Negative\n" |