Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am as-cii on github.
  • I am as_cii (https://keybase.io/as_cii) on keybase.
  • I have a public key ASDBqtrnnUHmJwAyEa_3oYSJbTxmmDnYdba5f8ji79J4pAo

To claim this, I am signing this object:

@as-cii
as-cii / update-atom
Created May 16, 2018 08:33
Nightly build installation script for Atom
#!/usr/bin/env bash
set -e
GREEN='\033[0;32m'
NC='\033[0m' # No Color
atom_zipped_path=$(mktemp)
atom_unzipped_parent_path=$(mktemp -d)
function cleanup {
#!/bin/sh
echo "Downloading latest Atom master build..."
mkdir atom
artifact_url=$(script/last-atom-master-artifact-url.js)
curl -s -L $artifact_url \
-H 'Accept: application/octet-stream' \
-o "atom.zip"
unzip -q atom.zip -d atom
export ATOM_APP_NAME="Atom.app"
@as-cii
as-cii / splay-vs-treap-benchmark.diff
Last active February 4, 2016 10:42
Splay Tree vs. Treap Patch Benchmark
diff --git a/test/patch.test.js b/test/patch.test.js
index 5c32503..da9ba5b 100644
--- a/test/patch.test.js
+++ b/test/patch.test.js
@@ -48,6 +48,184 @@ describe('Patch', function () {
assert.deepEqual(iterator.getMetadata(), {b: 2})
})
+ function runBenchmark (fn, setup = () => {}, iterations = 3000) {
+ let t0, t1
@as-cii
as-cii / gist:ea76e04a352b19713a2e
Created April 28, 2015 14:32
Remove temp with functional
###
### First approach
###
[class_months(es, class_name)].flat_map { |range| [range.count.to_f, month_range(range.first, upto_date).count] }
.reduce(:/) * 100
###
### Second Approach
###
@as-cii
as-cii / gist:9387427
Created March 6, 2014 11:05
External Sidekiq
# create the submission...
keys = { 'class' => 'babel-worker', 'args' => whatever }
Sidekiq::Client.push(keys.stringify_keys)