Skip to content

Instantly share code, notes, and snippets.

Josh Tilles MerelyAPseudonym

Block or report user

Report or block MerelyAPseudonym

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
@bhb
bhb / README.md
Last active Apr 2, 2019
Clojure friendly mode, inspired by https://github.com/slipset/friendly
View README.md
@devinrhode2
devinrhode2 / README.md
Last active Jul 3, 2019 — forked from tombigel/README.md
How to Change Open Files Limit on OS X and macOS Sierra (10.8 - 10.12)
View README.md

How to Change Open Files Limit on OS X and macOS

This text is the section about OS X Yosemite (which also works for macOS Sierra) from https://docs.basho.com/riak/kv/2.1.4/using/performance/open-files-limit/#mac-os-x

The last time i visited this link it was dead (403), so I cloned it here from the latest snapshot in Archive.org's Wayback Machine https://web.archive.org/web/20170523131633/https://docs.basho.com/riak/kv/2.1.4/using/performance/open-files-limit/

Mac OS X

To check the current limits on your Mac OS X system, run:

@stuarthalloway
stuarthalloway / missing_keys_specs.clj
Created Oct 14, 2017
I think it would be a mistake to introduce temporal coupling to prevent typos.
View missing_keys_specs.clj
;; I think it would be a mistake to introduce temporal coupling to prevent typos.
;; The example program below lets you identify "missing" keys specs at
;; the time and place of your choosing, and then handle them as you
;; deem appropriate, without imposing those decisions on other
;; users of spec.
(require '[clojure.spec.alpha :as s]
'[clojure.set :as set])
@bazad
bazad / build-xnu-4570.1.46.sh
Created Oct 6, 2017
A script to build XNU version 4570.1.46 (macOS High Sierra 10.13).
View build-xnu-4570.1.46.sh
#! /bin/bash
#
# build-xnu-4570.1.46.sh
# Brandon Azad
#
# A script showing how to build XNU version 4570.1.46 on MacOS High Sierra
# 10.13 with Xcode 9.
#
# Note: This process will OVERWRITE files in Xcode's MacOSX10.13.sdk. Make a
# backup of this directory first!
@aphyr
aphyr / gist:0ad3458a1478db97517e7ac2faf2da00
Created Oct 5, 2017
Advice on benchmarking databases
View gist:0ad3458a1478db97517e7ac2faf2da00
Hi S-------. I'm not an expert in performance benchmarking--I focus on
correctness and safety--but I have a few pieces of advice here.
0. Pick multiple workloads that cover the gamut of behaviors in each DB.
*Don't* choose a completely sharded workload for VoltDB. Don't choose a
purely commutative workload for Cassandra. Cassandra's Paxos
implementation is slow and a good benchmark will demonstrate
that--however, it *doesn't* (I think?) require a global coordinator,
which means it might *scale* better than a single-coordinator system
like, say, VoltDB. Talk about those differences!
@tombigel
tombigel / README.md
Last active Oct 22, 2019 — forked from a2ikm/limit.maxfiles.plist
How to Change Open Files Limit on OS X and macOS Sierra (10.8 - 10.12)
View README.md

How to Change Open Files Limit on OS X and macOS

This text is the section about OS X Yosemite (which also works for macOS Sierra) from https://docs.basho.com/riak/kv/2.1.4/using/performance/open-files-limit/#mac-os-x

The last time i visited this link it was dead (403), so I cloned it here from the latest snapshot in Archive.org's Wayback Machine https://web.archive.org/web/20170523131633/https://docs.basho.com/riak/kv/2.1.4/using/performance/open-files-limit/

Mac OS X

To check the current limits on your Mac OS X system, run:

@pesterhazy
pesterhazy / react_cljs_es6_classes.cljs
Last active Aug 26, 2019
ClojureScript: bare React with ES6 classes (extending React.Component, no createClass or reagent)
View react_cljs_es6_classes.cljs
(ns demo.react-cljs-es6-classes
(:require [goog.object :as gobj]))
;; Demo of using bare React using ES6 classes (without createClass or reagent)
;;
;; Equivalent of Javascript/JSX:
;;
;; class MyComponent extends React.Component {
;; constructor(props) {
;; super(props);
View FizzBuzz.clj
;; try this form-by-form at a REPL
(require '[clojure.spec.alpha :as s])
;; create an inline DSL to describe the FizzBuzz world
(defmacro divides-by
[nm n]
`(s/def ~nm (s/and pos-int? #(zero? (mod % ~n)))))
;; specify FizzBuzz
(divides-by ::fizz 3)
@whiteinge
whiteinge / complex_salt_orchestrate.sls
Last active Oct 1, 2019
An example of a complex, multi-host Salt Orchestrate state that performs status checks as it goes
View complex_salt_orchestrate.sls
# /srv/salt/upgrade_the_app.sls
# Example of a complex, multi-host Orchestration state that performs status checks as it goes.
# Note, this is untested and is meant to serve as an example.
# Run via: salt-run state.orch upgrade_the_app pillar='{nodes: [nodeA, nodeB], version: 123}'
{% set nodes = salt.pillar.get('nodes', []) %}
{% set all_grains = salt.saltutil.runner('cache.grains',
tgt=','.join(nodes), tgt_type='list') %}
{# Default version if not given at the CLI. #}
@ericnormand
ericnormand / spect_test_core.clj
Last active Jul 9, 2018
Basic linting of spec usage
View spect_test_core.clj
(ns spec-test.core
(:require [clojure.spec.alpha :as spec]))
(defn paircat' [[a1 a2] [b1 b2]]
[(concat a1 b1) (concat a2 b2)])
(defn paircat [& pairs]
(reduce paircat' [[] []] pairs))
(defn mappaircat [f coll]
You can’t perform that action at this time.