- (2 points) Easy: What is the difference beteen var, val and def? [x] 2
- (3 points) Easy: How does pattern matching work in Scala? [x] 3
- (3 points) Easy: What are right associative methods in Scala? [x] 0
- (3 points) Easy: What is the difference between a trait and an abstract class in Scala? [x] 3
- (2 points) Medium: What is scala.util.control.NonFatal? [x] 2
- (3 points) Medium: How does Scala solve the diamond resolution problem with traits? [x] 3
I hereby claim:
- I am analytically on github.
- I am analytically (https://keybase.io/analytically) on keybase.
- I have a public key whose fingerprint is 6560 B522 27E1 4A62 A9A0 4685 FB67 7394 51EC 486A
To claim this, I am signing this object:
A curated list of AWS resources to prepare for the AWS Certifications
A curated list of awesome AWS resources you need to prepare for the all 5 AWS Certifications. This gist will include: open source repos, blogs & blogposts, ebooks, PDF, whitepapers, video courses, free lecture, slides, sample test and many other resources.
Index:
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 | |
set -e | |
sudo rm -f /etc/update-motd.d/10-help-text | |
sudo rm -f /etc/update-motd.d/51-cloudguest | |
sudo rm -f /etc/update-motd.d/91-release-upgrade | |
echo -e "[sysinfo]\nexclude_sysinfo_plugins = LandscapeLink" | sudo tee /etc/landscape/client.conf | |
echo deb https://get.docker.com/ubuntu docker main | sudo tee /etc/apt/sources.list.d/docker.list | |
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9 |
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
# {{ ansible_managed }} | |
# This file describes the network interfaces available on your system | |
# and how to activate them. For more information, see interfaces(5). | |
# The loopback network interface | |
auto lo | |
iface lo inet loopback | |
{% if ansible_interfaces|length > 2 %} |
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
# {{ ansible_managed }} | |
# This file describes the network interfaces available on your system | |
# and how to activate them. For more information, see interfaces(5). | |
# The loopback network interface | |
auto lo | |
iface lo inet loopback | |
{% if ansible_interfaces|length > 2 %} |
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
def rateLimit(action: => String, subject: => String, maxRequests: => Int): Directive0 = { | |
mapInnerRoute { | |
inner => ctx => | |
val key = action + ":" + subject | |
add(redis, key) | |
val actionCount = count(redis, key, interval) | |
if (actionCount >= maxRequests) { | |
logger.warn("Rate limiting user '" + subject + "': exceeded max number of requests (" + maxRequests + ").") |
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
def rateLimit(action: String, subject: String, maxRequests: Int) = { | |
val key = action + ":" + subject | |
add(redis, key) | |
val actionCount = count(redis, key, interval) | |
transformRequestContext { | |
ctx => | |
ctx.withResponseTransformed { | |
response => |
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 cc.spray.typeconversion.{DefaultMarshallers, SimpleMarshaller, SimpleUnmarshaller, DefaultUnmarshallers} | |
import com.thoughtworks.xstream.XStream | |
import com.thoughtworks.xstream.io.xml.StaxDriver | |
import cc.spray.http._ | |
import MediaTypes._ | |
import HttpCharsets._ | |
import cc.spray.json._ | |
import cc.spray.SprayBaseSettings | |
import cc.spray.http.ContentTypeRange |