Skip to content

Instantly share code, notes, and snippets.

joefromct

Block or report user

Report or block joefromct

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
View stairway.clj
(defn reached-top-of-staircase?
"Tests to make sure the steps get us to the top of the stairway."
[stairway-height step-tuple ]
(= stairway-height (apply + step-tuple)))
(defn num-to-tuple
"Takes a string-number like \"123\" and moves into a seq like (1 2 3)"
[^String whole-num]
(->> whole-num
Integer.
View test.md
[global]
mssql_driver: {/usr/local/opt/msodbcsql17/lib//libmsodbcsql.17.dylib}

[source]
table: dbo.micromessagedetail
sql:
  select
      1 as etl_status          ,         /* smallint NOT NULL default 9 ,  */
@joefromct
joefromct / recur-with-atom.clj
Created Feb 11, 2019
can i remove the atom?
View recur-with-atom.clj
(def airplanes {:planes
{:plane
[{:make "Cessna",
:year "1977",
:model {:#text "MoonDart", :at-color "blue"},
:owner ["mitch" "glen" "paulie"],
:action
[{:#text "sample text - landed the plane and it was windy.",
:at-type "landing",
:at-weather "windy",
View read xlsx in py.py
from openpyxl import load_workbook
from toolz import thread_last, partition, partial
from typing import List, Dict
def __list_to_dict_list(all_rows: List[List]) -> List[Dict]:
headers, *rest = all_rows
return [dict(zip(headers, x)) for x in rest]
View arch.sh
# MY ARCH INSTALL GUIDE
# Change /dev/nvme**** to whatever drive/partitons you want
# This basically gets you to a GUI login
parted
# rm * # dunno if * will work but, delete all partitions
# mkpart ESP fat32 1MiB 513MiB
# set 1 boot on
# mkpart primary ext4 513MiB 50%
# quit
cryptsetup -y -v luksFormat /dev/nvme0n1p2 # setup encrypted container, set container password
View db-async-test.core-test.clj
(ns db-async-test.core-test
(:require [jdbc.core :as j] ;; this is the namespace for funcool/clojure.jdbc
;;[clojure.java.jdbc :as j]
[while-let.core :refer [while-let]]
[clojure.java.io :as io]
[clojure.data.csv :as csv]
[clojure.core.async :as a :refer [>! >!! <! <!! go-loop go chan thread]]
[clojure.string :as str]))
View node.readline.cljs
(ns cljs-utils.core
(:require [clojure.string :as str]
[cljs.nodejs :as nodejs]))
(nodejs/enable-util-print!)
(defn -main [& args]
(let [
readline (nodejs/require "readline")
View node.readline.js
var readline = require('readline');
var rl = readline.createInterface({
input: process.stdin,
output: process.stdout,
terminal: false
});
rl.on('line', function (line) {
View recur.py
# given a list like this:
the_list = [1,2,3,4,5]
# We could call do_something() for each item in the list like this:
for li in the_list:
do_something(li)
@joefromct
joefromct / atom_clojure_setup.md
Created Dec 2, 2016 — forked from jasongilman/atom_clojure_setup.md
This describes how I setup Atom for Clojure Development.
View atom_clojure_setup.md

Atom Clojure Setup

This describes how I setup Atom for an ideal Clojure development workflow. This fixes indentation on newlines, handles parentheses, etc. The keybinding settings for enter (in keymap.cson) are important to get proper newlines with indentation at the right level. There are other helpers in init.coffee and keymap.cson that are useful for cutting, copying, pasting, deleting, and indenting Lisp expressions.

Install Atom

Download Atom

The Atom documentation is excellent. It's highly worth reading the flight manual.

You can’t perform that action at this time.