Skip to content

Instantly share code, notes, and snippets.

View ljsc's full-sized avatar

Lou Scoras ljsc

  • Bloomberg LP
  • Washington, DC
View GitHub Profile
@mrmartineau
mrmartineau / stimulus.md
Last active July 18, 2024 07:43
Stimulus cheatsheet
@jpf
jpf / signed-jwt-in-python.md
Last active February 17, 2024 15:07
JWTs signed with RS256 in Python: A demonstration of org-babel

Introduction

This is a guide to using pyjwt to sign and validate a JWT using RS256.

The trickiest part of doing this is knowing what the proper OpenSSL commands are to generate the RSA keypair. I demonstrate that below.

Generating RSA keys

@echeran
echeran / async_util.clj
Last active March 1, 2024 23:46
Utility functions for core.async 0.1.346.0-17112a-alpha to create a linear pipeline of go-routines in a Storm-esque way.
(ns your.namespace.async-util
(:require
[clojure.core.async :as a :refer [>! <! >!! <!! go chan buffer
close! thread alts! alts!! timeout]]
[clojure.core.match :as match :refer [match]]))
;;
;; core.async util fns
;;
@zchee
zchee / .README.md
Last active August 17, 2021 11:38 — forked from tarruda/.README.md
Tmux/Vim integration

Some scripts/configurations that greatly improve tmux/vim workflows. The shell scripts target zsh but should be adaptable without much effort for other unix shells.

Features:

  • Transparently move between tmux panes and vim windows
  • Using the shell, open files in one vim instance per project or directory
  • Fully integrated copy/paste between tmux, vim and x11 using simple keybinds(need to install the xclip program)
  • Easily send text to any tmux pane without breaking your edit workflow(needs slimux

'vim-tmux-move.zsh', '.vimrc' and '.tmux.conf' cooperate so you can move transparently between tmux panes and vim windows using ALT + (arrow keys or jkhl). It was based on this gist

@stephenbaldwin
stephenbaldwin / gist:c69dec9d923ac668fec3
Last active August 29, 2015 14:06
Things Andrew Does

The Common Traits, Endeavors and Actions of Andrew

  • Structs
  • Throws around words like "orthogonal", "homunculus", "fucktard" and "fucktarded"
  • Sighs heavily when reading other peoples code
  • Blacksmiths
@stephenbaldwin
stephenbaldwin / gist:b09f8aafb8208e563496
Last active August 29, 2015 14:06
A Collection of Words and Phrases that Lou Uses Daily

Lou's Daily Vocabulary

  • Idempotent
  • Caveat lector
  • Apropos
  • Ostensibly
  • Antithesis
  • Denigrate
  • Accoutrement
  • Vagaries
@JunichiIto
JunichiIto / alias_matchers.md
Last active July 18, 2024 15:03
List of alias matchers in RSpec 3

This list is based on aliases_spec.rb.

You can see also Module: RSpec::Matchers API.

matcher aliased to description
a_truthy_value be_truthy a truthy value
a_falsey_value be_falsey a falsey value
be_falsy be_falsey be falsy
a_falsy_value be_falsey a falsy value
@evancz
evancz / Architecture.md
Last active December 21, 2022 14:28
Ideas and guidelines for architecting larger applications in Elm to be modular and extensible

Architecture in Elm

This document is a collection of concepts and strategies to make large Elm projects modular and extensible.

We will start by thinking about the structure of signals in our program. Broadly speaking, your application state should live in one big foldp. You will probably merge a bunch of input signals into a single stream of updates. This sounds a bit crazy at first, but it is in the same ballpark as Om or Facebook's Flux. There are a couple major benefits to having a centralized home for your application state:

  1. There is a single source of truth. Traditional approaches force you to write a decent amount of custom and error prone code to synchronize state between many different stateful components. (The state of this widget needs to be synced with the application state, which needs to be synced with some other widget, etc.) By placing all of your state in one location, you eliminate an entire class of bugs in which two components get into inconsistent states. We also think yo
@philandstuff
philandstuff / euroclojure2014.org
Last active February 19, 2024 05:12
Euroclojure 2014

EuroClojure 2014, Krakow

Fergal Byrne, Clortex: Machine Intelligence based on Jeff Hawkins’ HTM Theory

  • @fergbyrne
  • HTM = Hierarchical Temporal Memory
  • Slides

big data

  • big data is like teenage sex
    • noone knows how to do it
    • everyone thinks everyone else is doing it
@jnaglick
jnaglick / hipchat-bot.js
Last active August 29, 2015 14:01
HipChat Bot
var userCmds = {
'make me a sandwich': {'type': 'say', action: 'make your own stupid sandwich!'}
};
botFunction = function() {
var m = $('.msgText').last().text();
var msg = null
if (userCmds[m]) {