Skip to content

Instantly share code, notes, and snippets.

View ZucchiniZe's full-sized avatar

Alex Bierwagen ZucchiniZe

View GitHub Profile
@ZucchiniZe
ZucchiniZe / list-files-in-dir.clj
Created February 15, 2016 10:00
simple clojure function to recursively list files in directories.
(let [directory (clojure.java.io/file "/path/to/list")
dir? #(.isDirectory %)]
(map #(.getPath %)
(filter (comp not dir?)
(tree-seq dir? #(.listFiles %) directory))))

Keybase proof

I hereby claim:

  • I am zucchinize on github.
  • I am alexb (https://keybase.io/alexb) on keybase.
  • I have a public key ASCk8ko1mNLkgQRgLOu6gU5feLRD6KNT_Tyh-SbHUGxj6Ao

To claim this, I am signing this object:

import random
def intellisult(name):
insult_words = {
'A': ['a confoundedly', 'a conspicuously', 'a cruelly', 'a deucedly', 'a devilishly', 'a dreadfully', 'a frightfully', 'a grievously', 'a lamentably', 'a miserably', 'a monstrously', 'a piteously', 'a precociously', 'a preposterously', 'a shockingly', 'a sickly', 'a wickedly', 'a woefully', 'an abominably', 'an egregiously', 'an incalculably', 'an indescribably', 'an ineffably', 'an irredeemably', 'an outrageously', 'an unconscionably', 'an unequivocally', 'an unutterably'],
'B': ['appalling', 'babbling', 'backward', 'bantering', 'blabbering', 'blighted', 'boorish', 'contemptible', 'corpulent', 'cretinous', 'debauched', 'decadent', 'demented', 'depraved', 'detestable', 'dissolute', 'execrable', 'fiendish', 'foolish', 'foul', 'gluttonous', 'grotesque', 'gruesome', 'hermaphroditic', 'hideous', 'ignominious', 'ignorant', 'ill-bred', 'ill-mannered', 'incompetent', 'incorrigible', 'indecent', 'inept', 'insignificant', 'insufferable', 'insufferable', 'lasc
module Todo exposing (main)
import Css exposing (..)
import Css.Colors exposing (..)
import Html
import Html.Styled exposing (..)
import Html.Styled.Events exposing (..)
import Html.Styled.Attributes exposing (..)
@ZucchiniZe
ZucchiniZe / teaching_programming.md
Last active November 8, 2017 22:10
teaching programming to hs juniors who have no prior experience

Teaching how to code

We will be learning the basics of programming using the very common language 'javascript'. Some of you may have heard of the programming language 'java'. It is very different from javascript. Javascript is somewhat similar to C++ which is the language that we use to program the arduinos.

Instructions

To follow along, all of you should go to https://repl.it/languages/javascript. There are two halves of the screen, the white and the navy

cgi-bin/build_layout.bash 81851801da18b5336ebd979ef5830185159fe765d4c6b9 KType standard "KType-Standard-0.kll" "KType-Standard-1.kll" 2>&1
+ DefaultMapOverride='stdFuncMap KType-Standard-0'
+ PartialMapsExpandedOverride='stdFuncMap KType-Standard-1'
+ CMakeExtraArgs=-DCONFIGURATOR=1
+ /srv/KiiConf/controller/Keyboards/k-type.bash -c /srv/KiiConf/controller -o /srv/KiiConf/tmp/81851801da18b5336ebd979ef5830185159fe765d4c6b9
linux-gnu/Linux is supported.
Selected Generator: Ninja
/srv/KiiConf/tmp/81851801da18b5336ebd979ef5830185159fe765d4c6b9
-- Build CPU Detected:
x86_64
@ZucchiniZe
ZucchiniZe / layout.json
Last active November 2, 2017 16:09
k-type keyboard layout json file (since no caching has been implemented into the configurator :p)
{
"header": {
"Variant": "standard",
"Generator": "NONE",
"Base": "Base",
"Date": "2017-10-13",
"KLL": "0.5c",
"Author": "jbondeson (Jeremy Bondeson) 2017",
"Version": "0.2",
"Name": "KType",
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
let pluralize ::word numItems::items => {
if (items != 1) {
(string_of_int items) ^ " " ^ word ^ "s";
} else {
(string_of_int items) ^ " " ^ word;
}
};
type item = {
id: int,

Keybase proof

I hereby claim:

  • I am zucchinize on github.
  • I am alexb (https://keybase.io/alexb) on keybase.
  • I have a public key ASBOnQe7vgywFqdl3lVqVhC5x2rqbAnDUNqcR2_g6Q22MAo

To claim this, I am signing this object: