This file contains 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 nix-shell | |
#! nix-shell -i "emacs --batch -l $HOME/.emacs.d/core/core-load-paths.el -l" -p emacs26-nox | |
(require 'core-configuration-layer) | |
(configuration-layer/discover-layers) | |
(configuration-layer/make-all-packages nil) | |
(princ "p:\n") | |
(princ "let checked = n:\n") | |
(princ " let p' = p.${n} or null;\n") | |
(princ " in if p'.meta.broken or false then null else p';\n") |
This file contains 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 <Carbon/Carbon.h> | |
typedef uint64_t CGSConnection; | |
extern CGSConnection _CGSDefaultConnection(void); | |
#define CGSDefaultConnection _CGSDefaultConnection() | |
typedef uint64_t CGSSpace; | |
typedef enum _CGSSpaceType { | |
kCGSSpaceUser, | |
kCGSSpaceFullscreen, |
This file contains 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 Printf | |
%default total | |
data Format = FInt Format -- %d | |
| FString Format -- %s | |
| FOther Char Format -- [a-zA-Z0-9] | |
| FEnd -- | |
format : List Char -> Format |
This file contains 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
trait Semigroup { | |
fn mappend(&self, b: Self) -> Self; | |
} | |
trait Monoid: Semigroup { | |
fn mempty() -> Self; | |
} | |
impl Semigroup for int { | |
fn mappend(&self, b: int) -> int { *self + b } |
This file contains 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/sh | |
## Or use an AUR helper, e.g. | |
## sudo aura -A nix | |
sudo pacman -S base-devel git | |
git clone https://aur.archlinux.org/nix.git | |
cd nix | |
makepkg -s | |
sudo pacman -U nix-*.pkg.tar.xz |
This file contains 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 <Carbon/Carbon.h> | |
typedef void *CGSConnectionID; | |
extern CGSConnectionID _CGSDefaultConnection(void); | |
#define CGSDefaultConnection _CGSDefaultConnection() | |
typedef uint64_t CGSSpace; | |
typedef enum _CGSSpaceType { | |
kCGSSpaceUser, | |
kCGSSpaceFullscreen, |
This file contains 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
Inductive bool : Type := | |
| true : bool | |
| false : bool. | |
Class Monoid (A : Type) := | |
{ | |
empty : A ; | |
append : A -> A -> A ; | |
left_neutrality : forall x, append empty x = x ; |
This file contains 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
function curry(f) { | |
return function(x) { | |
var g = f.bind(this, x); | |
if(g.length == 0) return g(); | |
if(arguments.length > 1) return curry(g).apply(this, [].slice.call(arguments, 1)); | |
return curry(g); | |
}; | |
} | |
var sum = curry(function(x, y) { |
This file contains 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
// Compiles fine even though the code is broken. | |
// This is because arrays are covariant and mutable. | |
// | |
// TypeScript team: Please fix either of those things. Preferably mutability :) | |
class Animal {} | |
class Snake extends Animal { | |
slither() { | |
alert("Slithering!") |
This file contains 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
<12>[ 7.735764] [4: loader: 1] D, [2021-10-27T10:57:19.822873//1.7457 #1] DEBUG -- : Looking to run task Tasks::SetupGadgetMode... | |
<12>[ 7.735846] [4: loader: 1] I, [2021-10-27T10:57:19.822956//1.7458 #1] INFO -- : Running Tasks::SetupGadgetMode... | |
<12>[ 7.736253] [4: loader: 1] I, [2021-10-27T10:57:19.823001//1.7458 #1] INFO -- : Configuring USB Gadget. | |
<12>[ 7.736428] [4: loader: 1] D, [2021-10-27T10:57:19.823539//1.7464 #1] DEBUG -- : $ mkdir -p /sys/kernel/config/usb_gadget/g1/strings/0x409 | |
<12>[ 7.736837] [4: loader: 1] D, [2021-10-27T10:57:19.823948//1.7468 #1] DEBUG -- : $ echo "0x04E8" > /sys/kernel/config/usb_gadget/g1/idVendor | |
<12>[ 7.737071] [4: loader: 1] D, [2021-10-27T10:57:19.824180//1.7470 #1] DEBUG -- : $ echo "0x6860" > /sys/kernel/config/usb_gadget/g1/idProduct | |
<12>[ 7.737304] [4: loader: 1] D, [2021-10-27T10:57:19.824415//1.7472 #1] DEBUG -- : $ echo "samsung-dreamlte" > /sys/kern |
NewerOlder