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
# dockerhub - A repository for various dockerfiles | |
# For more information; http://github.com/cmfatih/dockerhub | |
# | |
# SlimerJS | |
# | |
# Test | |
# sudo docker run fentas/slimerjs /usr/bin/slimerjs -v | |
# sudo docker run fentas/slimerjs /usr/bin/casperjs | head -n 1 | |
# sudo docker run -v `pwd`:/mnt/test fentas/slimerjs /usr/bin/slimerjs /mnt/test/test.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
function * getResponses(urls) { | |
const responses = urls.map(url => yield getServerResponse(url)); | |
return responses; | |
} |
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
function getValues () { | |
return { | |
a: 1, | |
b: 2 | |
}; | |
} | |
let {a, b} = getValues(); | |
console.log(a, b); |
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
const fun = ({param1 = 'some default value', param2 = 'other default value'} = {}) => { | |
console.log(param1); | |
console.log(param2); | |
console.log(options); // Can I somehow get access to the object that has param1 and param2 inside? | |
console.log(arguments[0]); // Is this the only way? | |
}; |
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 overlayModule = angular.module('angular-overlay', []).directive('elementOverlay', [function () { | |
return { | |
restrict: 'A', | |
link: function (scope, elem, attrs) { | |
$(elem[0].parentNode).css('position', 'relative'); | |
scope.$watch(function () { | |
return $(elem[0].parentNode).height(); | |
}, function (v) { | |
elem.css('height', v + 'px'); |
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 | |
# installation of Oracle Java JDK. | |
sudo apt-get -y update | |
sudo apt-get -y install python-software-properties | |
sudo add-apt-repository -y ppa:webupd8team/java | |
sudo apt-get -y update | |
sudo apt-get -y install oracle-java7-installer | |
# Installation of commonly used python scipy tools |
NewerOlder