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
server { | |
listen 80; | |
# set root and server_name here | |
# only serve validation files for Let's Encrypt on port 80 | |
location /.well-known/acme-challenge/ { | |
try_files $uri /dev/null =404; | |
} | |
# otherwise to SSL |
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
/* | |
Save To CSV 0.0.2 | |
@author Kevin Jantzer, Blackstone Audio | |
@since 2015-01-16 | |
intial code from http://stackoverflow.com/a/14966131/484780 | |
TODO | |
- needs improved (objects as values) |
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
/** | |
* Build for production: | |
* $ NODE_ENV=production webpack | |
* | |
* Build for staging or development mode | |
* $ webpack | |
* | |
* Run app server in dev mode and use Hot Module Replacement | |
* $ NODE_ENV=webpack nodemon --watch ./app index.js | |
* |
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: create a local temp directory | |
local_action: | |
module: command mktemp -d "{{ lookup('env', 'TMPDIR') | default('/tmp/') }}ansible.XXXX" | |
register: mktemp_output |
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
var path = require('path'); | |
var gulp = require('gulp'); | |
var streamqueue = require('streamqueue'); | |
var $gulp = require('gulp-load-plugins')({ | |
lazy: false | |
}); | |
var prependBowerPath = function (package) { | |
return path.join('./src/bower_components/', package); | |
}; |
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
@import "~normalize-scss/sass/normalize"; | |
$fa-font-path: "~font-awesome/fonts"; | |
@import "~font-awesome/scss/font-awesome.scss"; | |
@import "bourbon"; |
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
import Data.List | |
import qualified Data.Map.Strict as Map | |
import Data.Ord (comparing) | |
wordFrequency :: (Ord a) => [a] -> Map.Map a Int | |
wordFrequency xs = foldr (\word acc -> Map.insertWith (+) word 1 acc) Map.empty xs | |
nBiggest :: Int -> Map.Map a Int -> [(a, Int)] | |
nBiggest n m = take n $ sortBy (comparing $ negate . snd) $ Map.toList m |
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
u <- c(0.1, 0.3, 0.5) | |
chi_df <- 3 | |
target_power <- 0.9 | |
chi_base <- qchisq(0.95, chi_df) | |
get_power <- function(n) { | |
return (pchisq(q = chi_base, df = chi_df, ncp = n * u %*% u, lower.tail = FALSE)) | |
} | |
get_power(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
#! /usr/bin/env python | |
from xml.etree import ElementTree | |
from xml.sax.handler import ContentHandler | |
from xml.sax import parse | |
import csv | |