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 <cuda_runtime.h> | |
__global__ void frobnicator(unsigned char *dev, int n) { | |
int tid = blockIdx.x * blockDim.x + threadIdx.x; | |
if (tid < n) | |
dev[tid] ^= 42; | |
} | |
void *cuda_memfrob(void *mem, size_t n) | |
{ |
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
ZDOTDIR=$HOME/.config/zsh | |
. $HOME/.local/share/cargo/env |
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
{-# LANGUAGE DataKinds, StandaloneKindSignatures, GADTs, | |
StandaloneDeriving, DerivingStrategies, ScopedTypeVariables, | |
TypeOperators, TypeFamilies, ConstraintKinds, | |
FlexibleInstances, MultiParamTypeClasses, | |
IncoherentInstances, UndecidableSuperClasses, | |
TypeApplications, AllowAmbiguousTypes, | |
ScopedTypeVariables #-} | |
{-# OPTIONS_GHC -Wall -Wno-unticked-promoted-constructors -Wno-unused-imports #-} | |
module Main where |
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
{- vim: set sw=2 ts=2 et: -} | |
import qualified Data.Map as Map | |
import Data.Map (Map) | |
import Control.Monad.Fail | |
data Expr = Var String | |
| Infixes [String] Expr Expr | |
| Infix String Expr Expr | |
| Prefix String Expr |
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
use std::time::Instant; | |
use tokio::io::{AsyncReadExt, AsyncWriteExt}; | |
use tokio::net::TcpListener; | |
use tokio::net::TcpStream; | |
#[tokio::main] | |
async fn main() { | |
let listener = TcpListener::bind("0.0.0.0:9000").await.unwrap(); | |
loop { | |
let (mut client, addr) = listener.accept().await.unwrap(); |
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 <ctype.h> | |
#include <errno.h> | |
#include <inttypes.h> | |
#include <stdarg.h> | |
#include <stdint.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <sys/socket.h> | |
#include <sys/un.h> |
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 <signal.h> | |
#include <stdlib.h> | |
#include <stdio.h> | |
#include <string.h> | |
#include <unistd.h> | |
#include <xcb/xcb.h> | |
#include <xcb/xcb_aux.h> | |
#include <xcb/xcb_icccm.h> | |
#include <xcb/xcb_ewmh.h> | |
#include <cairo.h> |
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 <stdint.h> | |
#include <string.h> | |
//static_assert(sizeof(void *) == sizeof(uintptr_t), "Funky libc not allowed"); | |
//static_assert(sizeof(void *) == sizeof(uint64_t), "Only works on amd64"); | |
// We want to represent different values | |
// |
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
diff --git a/data/autosuspend.hwdb b/data/autosuspend.hwdb | |
index 43e996d..b559632 100644 | |
--- a/data/autosuspend.hwdb | |
+++ b/data/autosuspend.hwdb | |
@@ -163,6 +163,7 @@ usb:v04F3p0C99* | |
usb:v04F3p0C00* | |
usb:v04F3p0C4C* | |
usb:v04F3p0C5E* | |
+usb:v04F3p0C90* | |
ID_AUTOSUSPEND=1 |
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
#!/bin/bash | |
# | |
# Layout and Resolution | |
# NOTE: Equivalent settings set in xorg.conf | |
# NOTE: Never mind, xorg.conf is way too convoluted | |
SCREEN_NO="$(xrandr --query | grep '\bconnected\b' | wc -l)" | |
echo "Setting up $SCREEN_NO screen(s) with xrandr" |
NewerOlder