This file contains hidden or 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
module Main where | |
import qualified Data.DateTime as DATE | |
import qualified Control.Monad as C | |
import qualified Control.Monad.Trans as CT | |
import qualified Database.Redis as R | |
import qualified System.Random as SR | |
import qualified Data.ByteString.UTF8 as U | |
import qualified Data.Vector as V |
This file contains hidden or 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
#include <iostream> | |
#include <fstream> | |
#include <string> | |
#include <vector> | |
#include <ctime> | |
#include <random> | |
#include <hiredis/hiredis.h> | |
int main() { | |
const std::time_t now = std::time(NULL); |
This file contains hidden or 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
module Main where | |
import qualified Crypto.Hash.SHA1 as SHA1 | |
import qualified Data.Text as T | |
import qualified Data.Text.Encoding as TE | |
import qualified Data.ByteString as B | |
import qualified Text.Printf as P | |
import qualified Data.Word as W | |
import qualified Data.List.Split as S | |
import qualified Foreign as F |
This file contains hidden or 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
#!/usr/bin/env perl | |
use DateTime; | |
$| = 1; | |
my $tmux_out = ''; | |
my $sensors_bin = '/usr/bin/sensors'; | |
if (-e -x $sensors_bin) { | |
my $sensors_out = `$sensors_bin`; | |
if ($sensors_out =~ /temp1\:\s+\+(\d+)/s) { | |
$tmux_out .= '|' . $1 . 'C| '; | |
} |
This file contains hidden or 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
set-option -g status-bg black | |
set-option -g status-fg white | |
set-option -g status-interval 60 | |
set-option -g status-left "#(/home/brad/bin/imapbiff.pl)" | |
set-option -g status-right "#(/home/brad/bin/temp.pl)" | |
set-option -g pane-active-border-fg blue | |
unbind % | |
bind | split-window -h | |
bind - split-window -v | |
bind-key k select-pane -U |
This file contains hidden or 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
package main | |
import ( | |
"fmt" | |
"encoding/json" | |
) | |
type T struct { | |
I int | |
E interface{} |
This file contains hidden or 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
extern mod std; | |
fn main() { | |
let mut i = 1; | |
while i <= 100 { | |
let mod3 = ((i % 3) == 0); | |
let mod5 = ((i % 5) == 0); | |
if ! (mod3 || mod5) { | |
io::println(fmt!("%d",i)); | |
} else { |
This file contains hidden or 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
module Main where | |
import qualified Data.Conduit as C | |
import qualified Network.HTTP.Conduit as HC | |
main :: IO () | |
main = do | |
manager <- HC.newManager HC.def | |
request' <- HC.parseUrl "https://www.google.com/" | |
let request = request' { HC.checkStatus = \_ _ -> Nothing } | |
response <- C.runResourceT $ HC.httpLbs request manager |
This file contains hidden or 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
#lang typed/racket | |
(define-type T (U String Integer)) | |
(: fizzbuzz : ((Listof Integer) -> (Listof T))) | |
(define fizzbuzz | |
(lambda (l) | |
(cond [(null? l) '()] | |
[else (let* ([x (car l)] | |
[xs (cdr l)] | |
[mod3 (eq? 0 (modulo x 3))] |