When you start a clean Linode, it isn't secured in the following aspects:
- Allows root SSH login
- Uses password authentication on SSH
- Doesn't have a firewall
/* | |
* Consider a simple recursive function like: | |
* f(x) = if (x > 1) f(x - 1) + x | |
* else 0 | |
* | |
* This function isn't tail recursive (it could be, but let's set that aside for a moment). | |
* How can we mechanically, which is to say without thinking about it, convert this into a stack safe recursion? | |
* An approach is to model everything that happens after the recursion as a continuation, and build up that | |
* continuation in a stack safe manner. Here is some example code: | |
*/ |
import scalanative.native._ | |
import SDL._ | |
import SDLExtra._ | |
@extern | |
@link("SDL2") | |
object SDL { | |
type Window = CStruct0 | |
type Renderer = CStruct0 |
package application; | |
import javafx.scene.Group; | |
import javafx.scene.Node; | |
import javafx.scene.paint.Color; | |
import javafx.scene.shape.Circle; | |
import javafx.scene.text.Text; | |
import javafx.scene.text.TextBoundsType; | |
/** |
#!/bin/bash | |
# From ScalaCourses.com Introduction to Play Framework with Scala course | |
# https://www.scalacourses.com/student/showLecture/158 | |
set -eo pipefail | |
function help { | |
echo "Download or update Typesafe Activator on Linux and Cygwin" | |
echo "Usage: $(basename $0) [options]" |
The easiest way to start using the LLVM C++ API by example is to have LLVM generate the API usage for a given code sample. In this example it will emit the code required to rebuild the test.c
sample by using LLVM:
$ clang -c -emit-llvm test.c -o test.ll
$ llc -march=cpp test.ll -o test.cpp
This code was quickly ripped out of an active project to serve as an example. It will not compile in any way!
Any questions? Add them to the comments!
package controllers | |
import play.api.mvc._ | |
import scala.concurrent._ | |
import akka.actor.{Props, Actor} | |
import play.api.Play.current | |
import play.api.libs.concurrent.Akka | |
import scala.concurrent.ExecutionContext.Implicits._ | |
object Application extends Controller { |
Slightly disorganized but reasonably complete notes on the algorithms, strategies and optimizations of the Akka Cluster implementation. Could use a lot more links and context etc., but was just written for my own understanding. Might be expanded later.
Links to papers and talks that have inspired the implementation can be found on the 10 last pages of this presentation.
This is the Gossip state representation:
// Run this with scala <filename> | |
/** | |
* A Two-phase commit Monad | |
*/ | |
trait Transaction[+T] { | |
def map[U](fn: T => U): Transaction[U] = flatMap { t => Constant(fn(t)) } | |
def flatMap[U](fn: T => Transaction[U]): Transaction[U] = | |
FlatMapped(this, fn) |