Skip to content

Instantly share code, notes, and snippets.

/**
* Pull the set of file paths a write/edit/apply_patch actually touched.
*
* The mutation tools do not all report affected files the same way:
* - `write` usually has `input.path`.
* - Some edit modes report `details.path` or `details.perFileResults[].path`.
* - The hashline edit tool arrives as raw patch text (or an envelope around
* it), with paths in `[PATH#HASH]` section headers (legacy `¶PATH#HASH`).
*
* Extracted from the retired clj-syntax-warn extension; shared by
(ns tiingo-client
"Fns to request data from the tiingo API."
(:require [java-time :as jt]
[org.httpkit.client :as http]
[cemerick.url :as url]
[clojure.data.json :as json]
[manifold.deferred :as d]))
(def ^:private base-url "https://api.tiingo.com/tiingo/")
@sundbp
sundbp / leaderboard
Last active November 15, 2017 22:22
;;; leaderboard
(defn parse-goal-csv
[filename]
(->> (drop 1 (csv/read-csv (slurp filename)))
(map (fn [r]
{:season (nth r 0)
:league_id (to-int (nth r 1))
:date (nth r 2)
:match_id (to-int (nth r 3))
root@scw-par1-swarm2:~# docker network inspect services
[
{
"Name": "services",
"Id": "y0cyimsfsg6ueea1rxh6h66x7",
"Created": "2017-08-09T14:38:36.177281823Z",
"Scope": "swarm",
"Driver": "overlay",
"EnableIPv6": false,
"IPAM": {
version: '3'
services:
master:
image: sundbp/jenkins:2.73
ports:
- 8080:8080
- 50000:50000
volumes:
- jenkins_home_vol:/var/jenkins_home
networks:
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: jenkins-master
annotations:
kubernetes.io/ingress.global-static-ip-name: "jenkins"
kubernetes.io/tls-acme: "true"
kubernetes.io/ingress.class: "gce"
spec:
tls:

Keybase proof

I hereby claim:

  • I am sundbp on github.
  • I am sundbp (https://keybase.io/sundbp) on keybase.
  • I have a public key whose fingerprint is C26E 8A51 EE6A 13EF FB87 A401 CAD2 E4F5 8541 3B60

To claim this, I am signing this object:

@sundbp
sundbp / 0_reuse_code.js
Created January 12, 2014 13:24
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
Only in current.lloyd/: check-autorsync.test
diff -r -x .git -w current.lloyd/public_html/admin/addfolder.php current.sundbp/public_html/admin/addfolder.php
16c16,18
< $mysqli->query("INSERT INTO library_folders (id,client,name,parent,added) VALUES (NULL,$clientid,'$name',0,NOW())");
---
> $mysqli->query("INSERT INTO library_folders (
> listing, id,client,name,parent,added) VALUES (
> 0,NULL, $clientid,'$name',0,NOW())");
diff -r -x .git -w current.lloyd/public_html/admin/dnload.php current.sundbp/public_html/admin/dnload.php
3c3
Only in current.lloyd/: check-autorsync.test
diff -r -x .git current.lloyd/public_html/admin/delete.php current.sundbp/public_html/admin/delete.php
6c6
< if (empty($_GET["id"]) || empty($_GET["t"])) {
---
> if(empty($_GET["id"]) || empty($_GET["t"])) {
11c11
< if ($_GET["t"]=="template") {
---
> if($_GET["t"]=="template") {