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
{ | |
"parser": "babel-eslint", | |
"env": { | |
"browser": true, | |
"node": true | |
}, | |
"settings": { | |
"ecmascript": 6, | |
"jsx": true | |
}, |
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 gulp = require('gulp'); | |
var tar = require('gulp-tar'); | |
var gzip = require('gulp-gzip'); | |
var webpack = require('webpack-stream'); | |
var watch = require('gulp-watch'); | |
var plumber = require('gulp-plumber'); | |
var browserSync = require('browser-sync').create(); | |
var rsync = require('gulp-rsync'); | |
var entry, dest, webkitDevConfig, webkitConfig, devServer; |
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 autoprefixer = require('autoprefixer'); | |
const webpack = require('webpack'); | |
module.exports = { | |
watch: true, | |
output: { | |
path: __dirname + '/dist', | |
filename: 'bundle.js' | |
}, | |
module: { |
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 autoprefixer = require('autoprefixer'); | |
const webpack = require('webpack'); | |
module.exports = { | |
output: { | |
path: __dirname + "/dist", | |
filename: "bundle.js" | |
}, | |
module: { | |
loaders: [ |
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 subprocess | |
import re | |
from dateutil import parser | |
class History(object): | |
def __init__(self, commits): | |
self._commits = ['%s' % n for n in commits if n.ot] | |
def __iter__(self): | |
return iter() |
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
require 'rubygems' | |
require 'net/imap' | |
require 'tmail' | |
require 'parsedate' | |
# NOTE: Set these values before you run the script | |
# Your gmail username | |
USERNAME = "YOUR_USERNAME" | |
# Your gmail password |
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
#s.privileged = false | |
#s.inline = "sudo sed -i '/tty/!s/mesg n/tty -s \\&\\& mesg n/' /root/.profile" | |
bash -c 'BASH_ENV=/etc/profile exec bash' |
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
#!/bin/bash | |
apt-get install --yes lsb-release | |
DISTRIB_CODENAME=$(lsb_release --codename --short) | |
DEB="puppetlabs-release-${DISTRIB_CODENAME}.deb" | |
DEB_PROVIDES="/etc/apt/sources.list.d/puppetlabs.list" # Assume that this file's existence means we have the Puppet Labs repo added | |
if [ ! -e $DEB_PROVIDES ] | |
then | |
# Print statement useful for debugging, but automated runs of this will interpret any output as an error |
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
#!/bin/sh | |
# Called by "git push" after it has checked the remote status, | |
# but before anything has been pushed. | |
# | |
# If this script exits with a non-zero status nothing will be pushed. | |
# | |
# Steps to install, from the root directory of your repo... | |
# 1. Copy the file into your repo at `.git/hooks/pre-push` | |
# 2. Set executable permissions, run `chmod +x .git/hooks/pre-push` |
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
-- If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23. | |
-- Find the sum of all the multiples of 3 or 5 below 1000. | |
rec_sum [] = 0 | |
rec_sum (x:xs) = x + rec_sum xs | |
nums = [(x::Integer) | x <- [1..999], x `mod` 3 == 0 || x `mod` 5 == 0] | |
total = rec_sum nums | |
main = do |