Skip to content

Instantly share code, notes, and snippets.

View benjumanji's full-sized avatar

Benjamin Edwards benjumanji

View GitHub Profile
@benjumanji
benjumanji / main.dart
Created May 26, 2023 18:01
cylindrical-nebula-3857
import 'dart:typed_data';
import 'dart:convert';
void main() {
var p = Uint8List.fromList([
0x42, 0x65, 0x6e, 0xe2, 0x80, 0x99, 0x73, 0x20, 0x49, 0x70, 0x68, 0x6f, 0x6e, 0x65
]);
print(String.fromCharCodes(p));
print(utf8.decode(p));
}
#!/bin/bash
trim() {
echo "${1%.*}"
}
if [[ -z "$1" ]]; then
# cd ~/.password-store
# rg --files | while read x; do trim $x; done
echo this
package xxx.security.authc.keymaker
import java.security.KeyFactory
import java.security.interfaces.ECPublicKey
import java.security.spec.X509EncodedKeySpec
import javax.security.auth.x500.X500Principal
import com.google.protobuf.ByteString
import monix.eval.Task
import org.bouncycastle.asn1.x500.X500Name

Keybase proof

I hereby claim:

  • I am benjumanji on github.
  • I am bene (https://keybase.io/bene) on keybase.
  • I have a public key ASAB-xqvKYrpLsOaLAfuOnlds3UgV50nVwIysqjVEQHP7go

To claim this, I am signing this object:

@benjumanji
benjumanji / Main.hs
Last active August 29, 2015 14:26
Quick and cheesy fresh id generator
module Main where
main :: IO ()
main = let strings = evalSupply examples 0
-- will print
-- got: 0
-- got: 1
in mapM_ putStrLn strings
data Cnt a = Cnt (Int -> (Int, a))
main :: IO ()
main = undefined
test = do
x <- eitherString1
(y,_) <- eitherString2
return (x ++ y)
where
eitherString1 = Right "lol"
eitherString2 = Right ("Yolo", 7)
@benjumanji
benjumanji / hello.scala
Created June 5, 2014 20:56
this is a joke, surely.
object Hi {
def main(args: Array[String]) = {
println(testing)
}
def testing : Either[String, String] = {
val eitherString1 = Right("lol")
val eitherString2 = Right("YOLO", 7)
for {

Keybase proof

I hereby claim:

  • I am benjumanji on github.
  • I am bene (https://keybase.io/bene) on keybase.
  • I have a public key whose fingerprint is F023 2FFD 5425 FBA4 38FF 354D 2EFF 8B3E 1A2D FDC1

To claim this, I am signing this object:

@benjumanji
benjumanji / Main.hs
Created May 9, 2014 20:09
uniplate / recursion schemes example
{-# LANGUAGE LambdaCase
, DeriveFunctor
, DeriveDataTypeable
, TypeFamilies #-}
module Main where
import Control.Applicative
( pure
, (<$>)
, (<*>)