My experiments with an XMonad setup in NixOS. This is my work box now, so it pretty much works.
probably needs:
# useradd -m iain
# passwd iain ...
# passwd root ...
#!/bin/sh | |
# pandoc -f markdown+lhs -t html5 --smart --css https://raw.github.com/richleland/pygments-css/master/default.css s5topdf.lhs | |
# pandoc -f markdown+lhs -t html5 --smart --css s5topdf.css s5topdf.lhs | |
pandoc -f markdown+lhs -t html5 --smart s5topdf.lhs |
My experiments with an XMonad setup in NixOS. This is my work box now, so it pretty much works.
probably needs:
# useradd -m iain
# passwd iain ...
# passwd root ...
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
import Data.Time | |
instance Arbitrary UTCTime where | |
arbitrary = | |
do randomDay <- choose (1, 29) :: Gen Int | |
randomMonth <- choose (1, 12) :: Gen Int | |
randomYear <- choose (2001, 2002) :: Gen Integer | |
randomTime <- choose (0, 86401) :: Gen Int | |
return $ UTCTime (fromGregorian randomYear randomMonth randomDay) (fromIntegral randomTime) |
Most text nowadays is encoded as unicode, and yet some programming languages either don't natively support it, or require you to jump through some hoops to support it. Elixir and Haskell have good support for Unicode, however there are some issues we have to understand, in order to manipulate text well.
function YNABAccounts(accessToken, budgetId) { | |
const accounts = _getBudgetAccounts(accessToken, budgetId); | |
if(accounts == null) { | |
return null; | |
} | |
const columns = ["Name", "Type", "Budget", "Closed", "Balance"]; | |
const rows = accounts.map(function (acc) { | |
return [ |
use futures::StreamExt; | |
use std::error::Error; | |
use tokio; | |
use tokio::macros::support::Pin; | |
use tokio::prelude::*; | |
use tokio::time::{Duration, Instant}; | |
pub fn main() -> Result<(), Box<dyn std::error::Error>> { | |
let mut multi_threaded_runtime = tokio::runtime::Builder::new() | |
.threaded_scheduler() |