- "He who quotes others is an idiot" - Thomas Jefferson
- "Wine we need for health, and the health we need to drink vodka." - Viktor Chernomyrdin
- "To answer before listening -- that is folly and shame." - Proverbs 18:13
- "Some name it disappointment and become poorer, others name it experience and become richer" - Siegmund Warburg
- "If we want to fully experience love and belonging, we must believe that we are worthy of love and belonging." - Brene Brown
- In some ways suffering ceases to be suffering at the moment it finds a meaning, such as the meaning of a sacrifice." - Viktor Frankl
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
const minty = require('./index.js'); | |
const path = require('path'); | |
function hello(a,b,c) { | |
console.log(a); | |
var d = b + c; | |
console.log(d); | |
} | |
minty.file(path.join(__dirname, '/lib/test.js')); |
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
pick 019325e 0.1.0 | |
pick a4b689d Fetch all dependencies | |
squash 714a49d Matches keywords to Docker repos | |
pick d2d1ca3 parseDependencies returns an object of dependencies. | |
squash e3b6cd9 Clean up packageParser | |
squash 57acd67 Initial commit | |
squash 3f3e05e Rough out how we'll make Dockerfiles | |
squash 9e10b94 Can check for, make Docker files | |
squash a27b0ee Write docker files | |
pick a0980b8 Build Dockerfiles |
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
'use strict'; | |
function reducer(array, callback, initializer) { | |
let accumulator = (initializer === undefined) ? 0 : initializer; | |
for (let i = 0; i < array.length; i++) { | |
accumulator = callback(accumulator, array[i]); | |
} | |
return accumulator; |
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
from functools import reduce | |
def merge_arrays(accumulator, new): | |
# Since Python doesn't have multiline lambdas | |
# we define our reducer function here | |
last = len(accumulator) - 1 | |
if (new[0] <= accumulator[last][1]): | |
start = accumulator[last][0] |
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
def free_times(calendar_list): | |
output = [] | |
# This is easier with a list sorted by start time | |
# sort() is mergesort, with O(n) = n log n | |
# which is fast enough to not manually sort. | |
calendar_list.sort(key = lambda event: event[0]) | |
for index in range(len(calendar_list)): | |
if (index > 0): |
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
<?php | |
$sorted_arr = function ($range_to_sort) { | |
// Annoyingly, PHP can't return the sorted array from a sort | |
// Do it manually | |
usort($range_to_sort, function ($a, $b) | |
{ |
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
'use strict'; | |
function sortedCal(calArray) { | |
return calArray.sort((a, b) => a[0] > b[0]); | |
} | |
function mergeRanges(sortedCal) { | |
let start; | |
let end; |
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
############## | |
# Time-related tasks | |
set plannerMonth to (month of (current date) as text) | |
set plannerDay to (day of (current date) as text) | |
set plannerYear to (year of (current date) as text) | |
################ | |
# Set up our file paths | |
# Base paths |
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
echo " | |
rdr pass inet proto tcp from any to any port 80 -> 127.0.0.1 port 8080 | |
rdr pass inet proto tcp from any to any port 443 -> 127.0.0.1 port 8443 | |
" | sudo pfctl -ef - |