Skip to content

Instantly share code, notes, and snippets.

View benzap's full-sized avatar
Working from home

Benjamin Zaporzan benzap

Working from home
View GitHub Profile
benzap /
Created December 4, 2018 03:07
Broken Implementation for Problem 3
// Problem 3
extern crate regex;
use std::default::Default;
use std::collections::HashMap;
use std::collections::HashSet;
use std::io::BufReader;
use std::io::BufRead;
benzap / MultiLinkedList.sol
Last active October 5, 2018 22:13
Multi Linked List Implementation in Solidity
pragma solidity ^0.4.24;
Multiple Linked List Storage
Dynamic Storage Contract for storing multiple linked lists each
uniquely identified by a key. Implementation allows for
benzap / byte.cljc
Last active March 16, 2022 09:41
Working with bytes between clojure and clojurescript
(ns byte
"My own take on byte conversion. `(byte)` doesn't work with unsigneds
within clojure, and signed values don't work well within
clojurescript. Includes additional bitwise functions for working
specifically with bytes.")
(defn signed
"Signed byte that works between clojure and clojurescript.
benzap / hiccup2xml
Last active September 20, 2018 15:55
hiccup2xml script written in eden
#!/usr/bin/env eden
local help-message = "
hiccup2xml - Hiccup Markup to XML Markup
hiccup2xml read <filename>
hiccup2xml eval <string>
benzap / ChefFactory.sol
Last active September 18, 2018 18:31
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at
pragma solidity ^0.4.7;
contract ChefFactory {
event CreateChef(address _address);
struct Chef {
uint8 cooking_ability; // Personal Cooking Rating 1-10
uint8 baddaboops; // Acquired Taste Rating 1-10
benzap / i3-config
Created September 7, 2018 15:59
~/.i3/config file for i3 window manager
# i3 config file (v4)
# Please see for a complete reference!
# This config file uses keycodes (bindsym) and was written for the QWERTY
# layout.
# To get a config file with the same key positions, but for your current
# layout, use the i3-config-wizard
benzap / edn_linter.cljc
Created August 4, 2018 01:29
EDN Linter Example Use Case
(ns edn-linter
;; require name of edn linter
(:require [the-name :refer [parse-with-info]]
(def input-string "[:a :b
{:test 123}]")
(def parsed-edn (parse-with-info input-string))
;; {:line 0
;; :type :vector
benzap / higher-order-fizzbuzz.fif
Created May 28, 2018 07:22
Higher Order fizzbuzz from reddit post
;; From reddit comments
doc higher-fizzbuzz
"( map seq -- seq ) Returns modified seq with map target factors."
fn higher-fizzbuzz
*xs <> setl
*m <> setl
benzap / fif-repl.cljs
Last active May 28, 2018 04:49
Fif Interactive Repl Used in blog posts
(ns website.fif-repl
[clojure.string :as str]
[rum.core :as rum]
[fif.core :as fif]
[fif.stack-machine :as stack]
[fif.stack-machine.error-handling :refer [set-error system-error]]
;; Nothing to see here
[website.repl-imports :refer [import-super-secret-words]]))
benzap / fizzbuzz.fif
Last active May 28, 2018 07:20
Fizzbuzz in fif langauge
fn fizz-buzz
*n <> setl
n 3 mod zero?
n 5 mod zero? and if "FizzBuzz" else
n 3 mod zero? if "Fizz" else
n 5 mod zero? if "Buzz" else
then then then