Skip to content

Instantly share code, notes, and snippets.

View jsjohns's full-sized avatar

Josh Johnson jsjohns

View GitHub Profile
@jsjohns
jsjohns / dvd
Created August 26, 2011 19:23
ddv
sdv
In all test cases, error_reporting=-1. "Fatal Error" messages sent to stdout due to display_errors=1 setting. "PHP Fatal Error" messages sent to stderr due to log_errors=1/error_log=stderr setting.
Case #1: display_errors=1, log_errors=1
PHP Fatal error: Call to undefined function undefined() in /root/error.php on line 7
PHP Stack trace:
PHP 1. {main}() /root/error.php:0
Fatal error: Call to undefined function undefined() in /root/error.php on line 7
@jsjohns
jsjohns / gist:3852798
Created October 8, 2012 14:25 — forked from paullewis/gist:1982121
Mergesort in JavaScript
/**
* An implementation for Mergesort. Less efficient
* than Quicksort. Again, you'd just use Array.sort
* but if you found yourself unable to use that
* there's always this option.
*
* Tests with:
*
* var array = [];
* for(var i = 0; i < 20; i++) {
bool g() {
throw exception;
}
bool f(bool g) {
}
int main() {
f(g());
}
@jsjohns
jsjohns / hn-bi-stack-analysis.txt
Last active November 12, 2019 18:05
HN BI stack analysis
# Below command + manual pass to remove non-technical stuff
#
# wget -O - https://news.ycombinator.com/item?id=21513566 | html2text --ignore-links | tr '[:punct:]' ' ' | tr A-Z a-z | tr -s ' ' | tr ' ' '\n' | sort | uniq -c | sort -n | tail -r | egrep -v '\s+1'
48 looker
23 snowflake
21 redshift
20 metabase
19 sql
17 dbt