Skip to content

Instantly share code, notes, and snippets.

View jedfoster's full-sized avatar

Jed Foster jedfoster

View GitHub Profile
@jedfoster
jedfoster / README.md
Created February 5, 2018 17:21 — forked from jonathantneal/README.md
Local SSL websites on macOS Sierra

Local SSL websites on macOS Sierra

These instructions will guide you through the process of setting up local, trusted websites on your own computer.

These instructions are intended to be used on macOS Sierra, but they have been known to work in El Capitan, Yosemite, Mavericks, and Mountain Lion.

NOTE: You may substitute the edit command for nano, vim, or whatever the editor of your choice is. Personally, I forward the edit command to Sublime Text:

alias edit="/Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl"
The task of predicting election results is fraught with failure. When opinion polls, run on statistical methodologies, themselves get it wrong more often than not, what chance does a prognosis based on subjective analysis and anecdotal evidence fare? Not even a wild one.
Yet I attempt. Because events that alter the voting preference of an entire nation to cause a regime change are like black swan events. High impact events that cause to defeat the current incumbent are an extreme rarity. Therefore the uncertainty is reduced and we can reach a reasonable conclusion.
The null hypothesis is that Mr. Modi will win 2019. In ordinary language, this is the prevalent belief. The alternative hypothesis or the contrarian claim, is that Mr. Modi will not win.
In statistics, you would take a random population sample to calculate a test static and examine its value. If the value is in the region of rejection, the prevalent belief is rejected, thus accepting the contrarian claim. Otherwise, that is, the test statistic
@jedfoster
jedfoster / README.md
Created March 29, 2017 13:37 — forked from csswizardry/README.md
Vim without NERD tree or CtrlP

Vim without NERD tree or CtrlP

I used to use NERD tree for quite a while, then switched to CtrlP for something a little more lightweight. My setup now includes zero file browser or tree view, and instead uses native Vim fuzzy search and auto-directory switching.

Fuzzy Search

There is a super sweet feature in Vim whereby you can fuzzy find your files using **/*, e.g.:

:vsp **/*<partial file name><Tab>
@jedfoster
jedfoster / Koala.jpg
Last active May 8, 2019 03:14 — forked from uolcano/Koala.jpg
Be into the Gist
Koala.jpg
.
├── actions
├── stores
├── views
│   ├── Anonymous
│   │   ├── __tests__
│   │   ├── views
│   │   │   ├── Home
│   │   │   │   ├── __tests__
│   │   │   │   └── Handler.js
.
├── assets
│   ├── images
│   ├── sass/less/stylus/css
├── lib
│   ├── actions
│   ├── components
│   │   ├── __tests__
│   │   │ └── Avatar.test.jsx
│   │   └── Avatar.jsx
@jedfoster
jedfoster / SassMeister-input-HTML.jade
Created January 5, 2016 15:29
Generated by SassMeister.com.
.container
.box
img.box(src="https://gemio-dev.s3.amazonaws.com/jems/jem/image/354/test_gem.png")
@jedfoster
jedfoster / publish.sh
Created December 17, 2015 15:10 — forked from edrex/publish.sh
Upload static site to S3 with clean URLs
#!/bin/sh
# Be sure to set the index and 404 docs to "index" and "404" respectively in your bucket settings
# replace with your compile command
harp compile ./ ./out
# removes the html extension
for f in `ls out/*.html out/**/*.html`; do mv $f "${f%%.*}"; done
@jedfoster
jedfoster / SassMeister-input-HTML.html
Created September 3, 2015 18:57
Generated by SassMeister.com.
<video controls poster="http://www.videojs.com/img/poster.jpg">
<source src="http://vjs.zencdn.net/v/oceans.mp4" type="video/mp4"/>
<source src="http://vjs.zencdn.net/v/oceans.webm" type="video/webm" />
<track kind="captions" src="http://www.videojs.com/vtt/captions.vtt" srclang="en" label="English"></track>
</video>
@jedfoster
jedfoster / webkitmediasource-is-type-supported.html
Last active September 1, 2015 13:53 — forked from granoeste/webkitmediasource-is-type-supported.html
[JavaScript][HTML5][MediaSource] MediaSource.isTypeSupported
<!DOCTYPE html>
<html>
<head>
<script>
window.MediaSource = window.MediaSource || window.WebKitMediaSource;
function testTypes(types) {
for (var i = 0; i < types.length; ++i)
console.log("MediaSource.isTypeSupported(" + types[i] + ") : " + MediaSource.isTypeSupported(types[i]));
}