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
# Do something like: puts "ROCK".blink.bright.cyan | |
class String | |
def red | |
"\e[31m#{self}\e[0m" | |
end | |
def blue | |
"\e[34m#{self}\e[0m" | |
end |
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
Before: | |
-module(test_do). | |
-compile({parse_transform, erlando}). | |
-compile(export_all). | |
test_maybe(Arg) -> | |
do([maybe | |
|| X <- return(Arg), |
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
-module(test_do). | |
-compile({parse_transform, erlando}). | |
-compile(export_all). | |
test_statet(Arg) -> | |
StateT = statet:new(maybe), %% statet wrapping of maybe monad | |
StateT:execStateT( | |
do([StateT | |
|| S0 <- StateT:get(), |
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
Before: | |
-module(test_cut). | |
-compile({parse_transform, cut}). | |
-compile(export_all). | |
test_cut() -> | |
F0 = foo(a, b, _, 5+6, _), | |
F1 = F0(_, e), | |
F1(c). |
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 | |
import fileinput | |
import argparse | |
from operator import itemgetter | |
parser = argparse.ArgumentParser() | |
parser.add_argument('--target-mb', action = 'store', dest = 'target_mb', default = 61000, type = int) | |
parser.add_argument('vmtouch_output_file', action = 'store', nargs = '+') | |
args = parser.parse_args() |
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
console.log('Loading event'); | |
var Q = require('q'); | |
var aws = require('aws-sdk'); | |
var cloudfront = new aws.CloudFront(); | |
exports.handler = function (event, context) { | |
//_log('Received event: ', event); | |
var bucket = event.Records[0].s3.bucket.name; |