Skip to content

Instantly share code, notes, and snippets.

Norman Richards orb

Block or report user

Report or block orb

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
orb / gist:be1aaec26083ea83a8efd101cc1bfbe9
Created Jul 12, 2019
rmtilde - clean up dangling editor tmp files
View gist:be1aaec26083ea83a8efd101cc1bfbe9
find . -type f \( -name "#*" -or -name ".#*" -or -name "*~" \) -print -delete
orb /
Created Apr 15, 2019
the org mode source

cisco-ats npm repositories

The @cisco-ats NPM packages are distributed in the cisco-threat-response-npm repository at, an internal Cisco artifactory instance. The repository is mirrored to at for authenticated use outside of the Cisco network.

using engci-maven

orb /
Created Mar 6, 2019
path finding

pathfinding in Clojure

Help, I’m stuck in a maze


Many AoC problems required some sort of path finding - shortest path, cheapest path according to the rules of the world.

orb / sort_compare.clj
Created Jan 19, 2019
compare team data
View sort_compare.clj
(ns sort-compare.core)
(def team-data
[{:team-id 1
:total-pts 7
:matches [{:schedule-id 1 :opp-team-id 2 :opp-team-pts 6 :team-points 3}
{:schedule-id 2 :opp-team-id 3 :opp-team-pts 6 :team-points 4}]}
{:team-id 2
:total-pts 7
:matches [{:schedule-id 1 :opp-team-id 1 :opp-team-pts 3 :team-points 6}
orb / sudoku.clj
Last active Jan 16, 2019 — forked from swannodette/gist:3217582
updated for the latest core.logic, with some minor tweaks for (I hope) clarity
View sudoku.clj
(ns sudoku
(:refer-clojure :exclude [==])
(:use [clojure.core.logic])
(:require [clojure.core.logic.fd :as fd]))
(defn init-board [vars puzzle]
(matche [vars puzzle]
([[] []]
View hw2-tests.sml
val test1a = [
all_except_option("foo", []) = NONE,
all_except_option("foo", ["bar"]) = NONE,
all_except_option("foo", ["foo"]) = SOME([]),
all_except_option("foo", ["foo","x","y"]) = SOME(["x","y"]),
all_except_option("foo", ["x","foo","y"]) = SOME(["x","y"]),
all_except_option("foo", ["x","y","foo"]) = SOME(["x","y"])]
val test1b = [
orb / roll.clj
Created Sep 11, 2018
an instaparse version of the roll parser, just for fun
View roll.clj
(ns roll.core
(:require [instaparse.core :as instaparse]
[clojure.string :as str]))
(def roll-parser
(instaparse/parser "
roll = quantity? <'d'> die-type (operator operand)?
<quantity> = number
<die-type> = number
<operand> = number
boolean saveImage(String fileName, String contentType, InputStream inputStream) {
Connection connection = null;
PreparedStatement statement = null;
ResultSet keySet = null;
try {
connection = dataSource.getConnection();
statement = connection.prepareStatement("INSERT INTO images (filename, content_type, content) values (?, ?, ?)",
new String[] {"id"});
statement.setString(1, fileName);
orb /
Last active May 8, 2018
I couldn't understand an email from a recruiter, so I used google translate and got this:

Dear keyword match,

You vaguely look like someone capable of doing work.

I have a couple jobs that I'm not going to bother to describe because that would have meant I needed to take the time to look at your actual experience and see if any of them are actually a fit. But trust me, these are big time real jobs that actually exist and would be perfect for you based on the fact that you matched a keyword.

Instead of telling you more, I'm going to ask you to tell me what you are doing now. If my fishing trip is successful, then I'll take the time to look and see if you might be a fit for one of the jobs I'm recruiting for. If you are, I might get back to you.

Thanks for your time, Recruiter Dude.

orb /
Created Apr 20, 2018
an example setting content type on download
package images;
import javax.servlet.ServletException;
import javax.servlet.ServletOutputStream;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
You can’t perform that action at this time.