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
using System; | |
using System.Linq; | |
using System.Collections.Generic; | |
using System.Collections.Concurrent; | |
using System.Diagnostics; | |
using System.Reflection; | |
using Xunit; | |
namespace Shovel.Lib | |
{ |
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
using System.Data; | |
using System.Reflection; | |
using System.Collections.Generic; | |
using System.Linq; | |
namespace Shovel.Lib; | |
public static class DataTableExtensions | |
{ | |
public static IEnumerable<T> IntoDtos<T>(this DataRowCollection rows) |
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
using System; | |
namespace Option.Abstractions | |
{ | |
public static class OptAbstractions | |
{ | |
public static Option<T> ToOption<T>(this T value) | |
where T: class | |
{ | |
if (value == null) |
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
/* ==UserStyle== | |
@name don't kill my eyes, OLD reddit | |
@version 1.0.0 | |
@description my old.reddit.com style | |
@author bjorn | |
@namespace bjorn | |
@updateURL https://gist.github.com/roobie/c8d28599acd3116363fc1b917c6737c0/raw/d57be0ee4a489315d868a8ad469f18b0ec7a2e08/old.reddit.com.user.css | |
@license CC-BY-NC-SA-4.0 | |
==/UserStyle== */ | |
@-moz-document domain("old.reddit.com") { |
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
local bit = require("bit") | |
local function u8_ToBinaryRepresentation (u8) | |
local function AND (x, v) | |
local res = bit.band(x, v) | |
if res ~= 0 then | |
return 1 | |
else | |
return 0 | |
end |
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 bash | |
set -e | |
set -u | |
export BASEDIR="$HOME" | |
export APP=appname | |
export APPDIR="$BASEDIR/$APP" | |
export DOCKER_OPTS="" | |
unset GIT_DIR |
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
# find * and + to be confusing, trying to use sequence and choice instead | |
(def peg-simple | |
~{:main (capture (some :S))}) | |
(peg/match peg-simple "hello") # @["hello"] | |
# from: | |
# https://janet-lang.org/docs/peg.html | |
(defn finder |
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
(def *default-ldflags* "-s") | |
(def zlib {:path "/abc/zlib"}) | |
(def libuv {:path "/abc/libuv"}) | |
(defn default-ldflags-with-runpath [&keys collections] | |
(var to-join @[]) | |
(each key (keys collections) | |
(let [prefix (string "/" key) | |
libs (in collections key) | |
extra (join-pkg-paths ":" prefix libs)] | |
(set to-join (array/concat to-join extra)))) |
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
:root { /* Borrowed from nim-lang.org */ | |
--primary-background: #171921; | |
--secondary-background: #1e202a; | |
--third-background: #2b2e3b; | |
--border: #0e1014; | |
--text: #fff; | |
--anchor: #8be9fd; | |
--anchor-focus: #8be9fd; | |
--input-focus: #8be9fd; | |
--strong: #bd93f9; |
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
(import ./testament/src/testament :as t) | |
(comment ``` | |
this code is a crude implementation of a TAP style renderer. | |
I've tried a couple of formatters found here https://www.npmjs.com/package/tape#pretty-reporters, | |
Some of which work pretty good, whereas others are a bit weird.```) | |
(def space " ") |
NewerOlder