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 'formula' | |
class Stunnel < Formula | |
homepage 'http://www.stunnel.org/' | |
url 'ftp://ftp.nluug.nl/pub/networking/stunnel/archive/4.x/stunnel-4.56.tar.gz' | |
mirror 'http://ftp.nluug.nl/pub/networking/stunnel/archive/4.x/stunnel-4.56.tar.gz' | |
sha256 '9cae2cfbe26d87443398ce50d7d5db54e5ea363889d5d2ec8d2778a01c871293' | |
# We need Homebrew OpenSSL for TLSv1.2 support | |
option 'with-brewed-openssl', 'Build with Homebrew OpenSSL instead of the system version' |
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 | |
# from here: http://www.codingsteps.com/install-redis-2-6-on-amazon-ec2-linux-ami-or-centos/ | |
# and here: https://raw.github.com/gist/257849/9f1e627e0b7dbe68882fa2b7bdb1b2b263522004/redis-server | |
############################################### | |
# To use: | |
# curl https://gist.githubusercontent.com/jmaciasluque/3f15df1249c35bd1d1e9/raw/88540b9d8c45b860d13b9f42193136cee9321690/install-redis.sh > install-redis.sh | |
# chmod 777 install-redis.sh | |
# ./install-redis.sh | |
############################################### | |
echo "*****************************************" |
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 | |
############################################### | |
# To use: | |
# curl https://gist.githubusercontent.com/jmaciasluque/b2ff2a4e47e71e701ca0/raw/50e7a1fcce742b50bcbaedb417132b5bec031cd5/install-mongo.sh > install-mongo.sh | |
# chmod 777 install-mongo.sh | |
# ./install-mongo.sh | |
############################################### | |
clear | |
echo "Going to install MongoDB for y'all..." |
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
private void exercise1() { | |
StringBuilder result = new StringBuilder(); | |
Arrays.asList("alpha", "bravo", "charlie", "delta", "echo", "foxtrot") | |
.forEach(word -> result.append(word.charAt(0))); | |
System.out.println(result); | |
} |
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
private void exercise2() { | |
List<String> list = new ArrayList<>(Arrays.asList("alpha", "bravo", "charlie", "delta", "echo", "foxtrot")); | |
list.removeIf(word -> (word.length() % 2) != 0); | |
System.out.println(list); | |
} |
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
private void exercise3() { | |
List<String> list = Arrays.asList("alpha", "bravo", "charlie", "delta", "echo", "foxtrot"); | |
list.replaceAll(String::toUpperCase); | |
System.out.println(list); | |
} |
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
private void exercise4() { | |
Map<String, Integer> map = new TreeMap<>(); | |
map.put("c", 3); | |
map.put("b", 2); | |
map.put("a", 1); | |
StringBuilder result = new StringBuilder(); | |
map.entrySet() | |
.forEach(entry -> | |
result.append(entry.getKey()) |
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
private void exercise5() { | |
new Thread( | |
() -> Arrays.asList(1, 2, 3, 4, 5, 6, 7, 8, 9, 10) | |
.forEach(System.out::print)) | |
.start(); | |
} |
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
private def exercise1() { | |
val result = new StringBuilder() | |
List("alpha", "bravo", "charlie", "delta", "echo", "foxtrot") | |
.foreach(word => result.append(word.charAt(0))) | |
println(result) | |
} |
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
private def exercise2() { | |
List("alpha", "bravo", "charlie", "delta", "echo", "foxtrot") | |
.filterNot(_.length % 2 != 0) | |
.foreach(println) | |
} |
OlderNewer