These are my notes on instaling NixOS 16.03 on a Lenovo ThinkPad X1 Carbon (4th generation) with an encrypted root file system using UEFI.
Most of this is scrambled from the following pages:
These are my notes on instaling NixOS 16.03 on a Lenovo ThinkPad X1 Carbon (4th generation) with an encrypted root file system using UEFI.
Most of this is scrambled from the following pages:
In response to a request on Reddit, I'm writing up my thoughts on PVP upper bounds. I'm putting this in a Gist since I don't want to start yet another debate on the matter, just provide some information to someone who asked for it. Please don't turn this into a flame war :)
For those unaware: the Package Versioning Policy is a set of recommendations covering how to give version numbers to your packages, and how to set upper and lower bounds on your dependencies.
I'll start by saying: I support completely with the PVP's recommendations on how to assign version numbers. While there are plenty of points in this design space, the PVP is an unobjectionable one, and consistency in the community is good. On multiple occasions, I have reached out to package authors to encourage compliance with this. (However, I've always done so privately, as opposed to a statement on Reddit, as I believe that to be a more likely route to successful convincing.)
The issue aro
module Assign where | |
import Data.IORef | |
mkSummer :: IO (Int -> Int -> IO Int) | |
mkSummer = do | |
ref <- newIORef 0 | |
return $ \x y -> do | |
val <- readIORef ref |
{-# LANGUAGE NamedFieldPuns #-} | |
-- The Expression Problem and my sources: | |
-- http://stackoverflow.com/questions/3596366/what-is-the-expression-problem | |
-- http://blog.ontoillogical.com/blog/2014/10/18/solving-the-expression-problem-in-clojure/ | |
-- http://eli.thegreenplace.net/2016/the-expression-problem-and-its-solutions/ | |
-- http://www.ibm.com/developerworks/library/j-clojure-protocols/ | |
-- To begin demonstrating the problem, we first need some |
org.drools.workbench.models.guided.dtable.shared.model.GuidedDecisionTable52 unmarshal = | |
org.drools.workbench.models.guided.dtable.backend.GuidedDTXMLPersistence.getInstance().unmarshal( | |
new String(Files.readAllBytes(Paths.get("src/main/resources/guidedTable.gdst"))) | |
); | |
String drl = org.drools.workbench.models.guided.dtable.backend.GuidedDTDRLPersistence.getInstance().marshal(unmarshal); | |
System.out.println(drl); |
Vodafone forces its customers to use their modem/router, the "Vodafone Station": using any other router is impossible because authentication is being done via a custom PPPoE setup.
In the PPPoE packet there is a field named Host-Uniq which is used to separate packets from different PPPoE sessions: Vodafone requires the Station serial number to be put in this field as authentication.
A Linux router with root access is needed to replace the Station with. With an xDSL connection a modem with a custom firmware like OpenWrt has to be used, most likely one based on a Lantiq SoC.
For a FTTH internet connection then every machine with at least two gigabit ethernet interface and a decent CPU will do it.
org.drools.workbench.models.guided.dtable.shared.model.GuidedDecisionTable52 unmarshal = | |
org.drools.workbench.models.guided.dtable.backend.GuidedDTXMLPersistence.getInstance().unmarshal( | |
new String(Files.readAllBytes(Paths.get("src/main/resources/guidedTable.gdst"))) | |
); | |
String drl = org.drools.workbench.models.guided.dtable.backend.GuidedDTDRLPersistence.getInstance().marshal(unmarshal); | |
System.out.println(drl); |
abstract class Animal<F extends Food> { abstract void eats(F f);} | |
abstract class Food {} | |
class Veg extends Food {} | |
class Meat extends Food {} | |
class Grass extends Veg {} | |
class Carrot extends Veg {} | |
class Cow extends Animal<Veg> { void eats(Veg f) {}} | |
class Main { | |
public static void main(String[] args) { |
UPDATE (March 2020, thanks @ic): I don't know the exact AMI version but yum install docker
now works on the latest Amazon Linux 2. The instructions below may still be relevant depending on the vintage AMI you are using.
Amazon changed the install in Linux 2. One no-longer using 'yum' See: https://aws.amazon.com/amazon-linux-2/release-notes/
sudo amazon-linux-extras install docker
sudo service docker start
public static void main(String[] args) { | |
final int parallelism = 8; | |
final ExecutorService executor = Executors.newFixedThreadPool(parallelism); | |
final CyclicBarrier started = new CyclicBarrier(parallelism); | |
final Callable<Long> task = () -> { | |
started.await(); | |
final Thread current = Thread.currentThread(); | |
long executions = 0; | |
while (!current.isInterrupted()) { | |
//quello che deve fare sul DM |