$ uname -r
{-#LANGUAGE BangPatterns #-} | |
module Main (main) where | |
import Data.Conduit as C | |
import qualified Data.Conduit.Combinators as C | |
import Pipes as P | |
import qualified Pipes.Prelude as P | |
import qualified Streaming.Prelude as Str |
Latency Comparison Numbers | |
-------------------------- | |
L1 cache reference/hit 1.5 ns 4 cycles | |
Floating-point add/mult/FMA operation 1.5 ns 4 cycles | |
L2 cache reference/hit 5 ns 12 ~ 17 cycles | |
Branch mispredict 6 ns 15 ~ 20 cycles | |
L3 cache hit (unshared cache line) 16 ns 42 cycles | |
L3 cache hit (shared line in another core) 25 ns 65 cycles | |
Mutex lock/unlock 25 ns | |
L3 cache hit (modified in another core) 29 ns 75 cycles |
module io.github.mchav.touchcube.CubeActivity where | |
import froid.javax.microedition.khronos.egl.EGLConfig | |
import froid.javax.microedition.khronos.opengles.GL10 | |
import froid.java.nio.ByteBuffer | |
import froid.java.nio.IntBuffer | |
import froid.app.Activity | |
import froid.content.Context |
Disclaimer: This piece is written anonymously. The names of a few particular companies are mentioned, but as common examples only.
This is a short write-up on things that I wish I'd known and considered before joining a private company (aka startup, aka unicorn in some cases). I'm not trying to make the case that you should never join a private company, but the power imbalance between founder and employee is extreme, and that potential candidates would
{ pkgs }: | |
let plugins = pkgs.callPackage ./plugins.nix {}; | |
in { | |
customRC = ''${builtins.readFile ./vimrc}''; | |
vam = { | |
knownPlugins = pkgs.vimPlugins // plugins; | |
pluginDictionaries = [{ | |
names = [ | |
"Tagbar" | |
"css-pretty" |
{ pkgs }: | |
{ | |
allowBroken = true; | |
allowUnfree = true; | |
packageOverrides = super: let self = super.pkgs; in with self; rec { | |
#### Global overrides. | |
--Roughly based on https://github.com/Gabriel439/Haskell-Morte-Library/blob/master/src/Morte/Core.hs by Gabriel Gonzalez et al. | |
data Expr = Star | Box | Var Int | Lam Int Expr Expr | Pi Int Expr Expr | App Expr Expr deriving (Show, Eq) | |
subst v e (Var v') | v == v' = e | |
subst v e (Lam v' ta b ) | v == v' = Lam v' (subst v e ta) b | |
subst v e (Lam v' ta b ) = Lam v' (subst v e ta) (subst v e b ) | |
subst v e (Pi v' ta tb) | v == v' = Pi v' (subst v e ta) tb | |
subst v e (Pi v' ta tb) = Pi v' (subst v e ta) (subst v e tb) | |
subst v e (App f a ) = App (subst v e f ) (subst v e a ) |
#!/usr/bin/env bash | |
# | |
# Update Google Domains Dynamic DNS from Zyxel C3000Z modem information. | |
# Tested on a Centurylink issued modem, YMMV | |
# | |
# See https://support.google.com/domains/answer/6147083?hl=en for | |
# Google Domains help and credentials information | |
# |
The following instructions assumes you already have your internet set up and working with CenturyLink. This is not for CenturyLink fiber setups. The modem I'm using is the ZyXEL C3000Z which was provided by CenturyLink.
To start, connect the dsl port on the Modem/router CenturyLink device (will call it "modem") to the wall phone jack and then plug in the power cable. Also connect the Google WiFi to power. Do not connect the two devices via ethernet yet.
Once they are both powered on, factory reset both devices. I've found this will cut down the number of problems during setup.
Reset Google Wifi: If you've previously set up a network with this device you'll need to reset the device through the Google WiFi app to get it to be removed from your list of owned networks. To do that go to the settings page (gears icon on right side), select "Network & General", select "Wifi point", and click "Factory reset." You can reset only the device by pressing and holding the button on the back the de