This file contains 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
'use strict' | |
function factorial(n) { | |
return n === 0 ? 1 : n * factorial(n - 1) | |
} | |
const almostFactorial = f => n => n === 0 ? 1 : n * f(n - 1) | |
function tagY(fn) { | |
const z = _ => fn(y)(_) |
This file contains 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
dimension | last year | budget | current year | |
---|---|---|---|---|
total year | 20 | 44 | 42 | |
year-to-date | 18 | 22 | 20 |
This file contains 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
{ | |
"name": "", | |
"version": "0.0.1", | |
"description": "", | |
"main": "", | |
"config": { | |
"eslintopts": "--cache --format codeframe --ext .js,.jsx" | |
}, | |
"lint-staged": { | |
"linters": { |
This file contains 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
Show hidden characters
{ | |
"parserOptions": { | |
"ecmaVersion": 2017, | |
"sourceType": "module" | |
}, | |
"plugins": [ | |
"lodash", | |
"jest", | |
"prettier" | |
], |
This file contains 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
include(CMakeParseArguments) | |
macro(combine_arguments _variable) | |
set(_result "") | |
foreach(_element ${${_variable}}) | |
set(_result "${_result} \"${_element}\"") | |
endforeach() | |
string(STRIP "${_result}" _result) | |
set(${_variable} "${_result}") | |
endmacro() |
This file contains 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 | |
set -e | |
# Merge this repo | |
SRCREPO=$1; shift | |
# into this one | |
DSTREPO=$1; shift | |
# at this path | |
BASENAME=$1; shift | |
# and apply this patch when done |
This file contains 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 | |
set -e | |
trap 'previous_command=$this_command; this_command=$BASH_COMMAND' DEBUG | |
trap 'echo FAILED COMMAND: $previous_command' EXIT | |
#------------------------------------------------------------------------------------------- | |
# This script will download packages for, configure, build and install a GCC cross-compiler. | |
# Customize the variables (INSTALL_PATH, TARGET, etc.) to your liking before running. | |
# If you get an error and need to resume the script from some point in the middle, | |
# just delete/comment the preceding lines before running it again. |
This file contains 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 | |
############################################################################ | |
# Note: Special network 192.162.50.3 to use Cisco Anyconnect Split tunnel. | |
# | |
# On OX X host you need to add a line (and file) /etc/exports: | |
# /Users -mapall=[youruser]:[yourgroup] [boot2dockerip] | |
# See: https://quip.com/EDYLAAfuup5M (no login needed) | |
# See also: https://github.com/boot2docker/boot2docker/issues/587#issuecomment-66935011 | |
# See also: http://support.apple.com/en-us/HT202243 |
This file contains 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 | |
# gist-id bc806b40192c24c4fea0 | |
set -e | |
set -o pipefail | |
# unified branching | |
# unified checkout | |
# cross-repo status |
This file contains 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
from System.Diagnostics import Process, ProcessStartInfo | |
from System import Environment | |
import shlex | |
import os | |
PIPE = -1 | |
STDOUT = -2 | |
class CalledProcessError(Exception): | |
""" |