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 spawn = require('child_process').spawn; | |
var Stream = require('stream'); | |
/** | |
* crops and resizes images to our desired size | |
* @param {Stream} streamIn in stream containing the raw image | |
* @return {Stream} | |
*/ | |
exports.cropImage = function(streamIn){ |
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
@-webkit-keyframes rotate { | |
0% {-webkit-transform: rotate(0deg);} | |
100% {-webkit-transform: rotate(360deg);} | |
} | |
.rotation { | |
-webkit-animation: rotate; | |
-webkit-animation-duration: 1s; | |
-webkit-animation-iteration-count: infinite; | |
-webkit-animation-timing-function: linear; |
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
// conversions | |
let c2i = x => x(y => y + 1, 0) | |
let c2star = x => x(y => y + '*', '') | |
let c2b = x => x('True', 'False') | |
let c2a = xs => xs((y, ys) => [c2i(y)].concat(ys), []) | |
// numbers | |
let zero = (s,z) => z | |
let one = (s,z) => s(z) |
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 bash | |
# build MooTools | |
packager build Core/Class \ | |
Core/Class.Extras \ | |
Core/Element \ | |
Core/Element.Event \ | |
Core/DOMReady \ | |
-blocks 1.2compat 1.3compat '!ES5' '!ES5-bind' \ |
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
%% puzzle description | |
% | |
% There is a desert, one camel and 3000 bananas. | |
% | |
% The camel has to transport as many bananas 1 km (1000 m). | |
% However each meter, the camel eats one banana. | |
% Also the camel can only carry 1000 bananas at the same time | |
% | |
% What is the maximum number of bananas the camel can bring to the other side? | |
% |
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
.text | |
j main # Jump to main-routine | |
.data | |
str1: .asciiz "Insert the array size \n" | |
str2: .asciiz "Insert the array elements,one per line \n" | |
str3: .asciiz "The sorted array is : \n" | |
str5: .asciiz "\n" | |
.text |
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 | |
slides=1; | |
video=1; | |
for var in "$@" | |
do | |
if [ "${var}" = "--slidesOnly" ]; then | |
video=0; |
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
"use strict"; | |
function toArray(thing) { | |
if (Array.isArray(thing)) return thing; | |
return Array.prototype.slice.call(thing); | |
} | |
function head(arr) { | |
return arr[0]; | |
} |
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 | |
usage () { | |
cat <<USAGE | |
Helper commands: | |
tags - List all tags relevant to this trunk | |
branches - List all branches relevant to this trunk | |
tag - Tag a trunk or branch copy. | |
branch - Branch a trunk or tag working copy. |
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 filter = require('prime/array/filter'); | |
var slice = Array.prototype.slice; | |
var curry = function(fn){ | |
var args = slice.call(arguments, 1); | |
return function(self){ | |
fn.apply(null, [self].concat(args); | |
}; | |
}; |
NewerOlder