Skip to content

Instantly share code, notes, and snippets.

View dsernst's full-sized avatar
🧘‍♂️
practicing mindfulness

David Ernst dsernst

🧘‍♂️
practicing mindfulness
View GitHub Profile
@dsernst
dsernst / mergeSort.js
Created January 17, 2015 22:42
Merge Sort in JavaScript
var mergeSort = function(array) {
if (array.length === 1) {
return array
} else {
var split = Math.floor(array.length/2)
var left = array.slice(0, split)
var right = array.slice(split)
left = mergeSort(left)
right = mergeSort(right)
@dsernst
dsernst / liquid-info.md
Last active July 28, 2017 04:13
LIQUID DEMOCRACY

Liquid — Real Political Representation  
--------------------------------------  
www.liquid.vote  

Reclaim your voice in government.  
Hold politicians accountable.  
Remove corruption. 
@dsernst
dsernst / bmndr-wiki_spam.txt
Created February 4, 2016 06:34
All the changes made to bmndr-wiki.dsernst.com
2 February 2016
(diff | hist) . . Main Page‎; 08:40 . . (0)‎ . . ‎146.185.234.48 (Talk)‎ (aOuwuMqXkNyjSsUaI)
1 February 2016
(diff | hist) . . N Real-World repo software Systems - Insights‎; 19:06 . . (+3,353)‎ . . ‎ReggieAlcala2 (Talk | contribs)‎ (Created page with "Designs are usually obtainable in many diverse designs including high end, signature and compact products, all of which offer excellent worth and fantastic quality. There are ...")
(diff | hist) . . N User:ReggieAlcala2‎; 19:06 . . (+177)‎ . . ‎ReggieAlcala2 (Talk | contribs)‎ (Created page with "Hi there! :) My name is Carissa, I'm a student studying Film Studies from Sandefjord, Norway.<br><br>my website [http://www.misiworld.de/kts/burningbook/index.php Repo Software]")
(diff | hist) . . N Speedy Systems Of repo software‎; 17:03 . . (+3,044)‎ . . ‎TerrellMcLoud (Talk | contribs)‎ (Created page with "There is an excellent consumer protection act in the state of California called the Song-Beverly Consumer Warranty Act, mostly referred to as the
@dsernst
dsernst / intro_to_promises.md
Last active January 26, 2016 11:40
Notes for a quick presentation to introduce other developers to Promises

Promises

Why?

  • reclaim simple synchronous control flow like return & throw
  • easier to write and maintain
  • banish callback hell

How?

@dsernst
dsernst / gmail-datetime-to-isodate.js
Created January 26, 2016 02:18
Convert a Gmail datetime into an ISODate for Mongo
// Convert a Gmail datetime into an ISODate for Mongo
function gmailToIso(string) {
return 'ISODate("' + new Date(string.split('at ').join('')).toISOString() + '")'
}

https://www.youtube.com/watch?v=U3_VUWWh7iw

  • white indents are the ones I wasn't with him for
    • Miami
  • Dallas
  • Somewhere near Portland (Oregon)
    • Campbell Falls (Massachusetts)
  • Chicago
  • Glacier National Park (Montana)
  • Thermopiles (Wyoming)
@dsernst
dsernst / fun-things-around-sf.md
Created December 29, 2015 18:53
Fun things in San Francisco

Fun things in San Francisco

A friend was visiting town so we were coming up with some of the best things to show him in San Francisco. These are some of my favorites:

  • Palace of Fine Arts
  • Walking around civic center / downtown / Financial District
  • Cable cars
  • Ocean Beach
  • Sutro Baths & Lands End
  • exploring Golden Gate Park
@dsernst
dsernst / talk-ideas.md
Created December 29, 2015 18:38
Longer Hack Reactor Lecture ideas

Longer Hack Reactor Lecture ideas:

  • Famous problems in computer science
  • how to send encrypted messages
  • passwords are obsolete
  • important events in the history of open-source
  • the earliest computers
  • why do people care about bitcoin?
  • Gödel's Incompleteness Theorem
  • most common biases that confuse our thinking
@dsernst
dsernst / os-specific-node_modules-packages.md
Last active November 4, 2015 07:58
How to use distinct npm packages across a host & VM when using a shared project folder

How to use distinctly compiled npm packages across a host machine & VM with a shared project folder

Use bcrypt and mongoose in each, with their own, OS-specific bindings
  1. Go to your ~/ home directory on the machine you want to install OS-specific module for, then run $ npm i compiled-package

  2. Move your package into ~/.node_modules folder (this is a special folder node knows to look in when requireing modules)

  • So probably: $ mv ~/node_modules/compiled-package ~/.node_modules/compiled-package
    • Shorthand: $ mv ~/{,.}node_modules/compiled-package
  • (consider rm -rfing the first node_modules folder to clean up after yourself)
@dsernst
dsernst / atom-stylesheet.less
Created October 8, 2015 22:18
My custom style modifications to Atom
/*
* Your Stylesheet
*
* This stylesheet is loaded when Atom starts up and is reloaded automatically
* when it is changed and saved.
*
* Add your own CSS or Less to fully customize Atom.
* If you are unfamiliar with Less, you can read more about it here:
* http://lesscss.org
*/