![Alt text](https://g.gravizo.com/svg? digraph G { aize ="4,4"; main [shape=box]; main -> parse [weight=8]; parse -> execute; main -> init [style=dotted]; main -> cleanup;
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Usage: | |
# REPO='cli/cli' /bin/bash -c "$(curl -fsSL https://gist.githubusercontent.com/timgreen/8e16f5a3549f2e902ecd8fa6813beba0/raw)" | |
# or | |
# REPO='cli/cli' /bin/bash -c "$(curl -fsSL https://tinyurl.com/mrx345m6)" | |
# ENV | |
# - REPO |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Based on https://gist.github.com/shadaj/aaac98b690cfeb0cbd891bfe3ce5725d#file-scala-in-colab-template-ipynb | |
SCALA_VERSION=2.12.8 | |
ALMOND_VERSION=0.3.0+16-548dc10f-SNAPSHOT | |
[ -f /usr/local/share/jupyter/kernels/scala/kernel.json ] && exit | |
curl -Lo coursier https://git.io/coursier-cli | |
chmod +x coursier | |
./coursier bootstrap \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env node | |
// Converts a saved Chrome dev tools recording with Screenshots to mp4 | |
const fs = require('fs'); | |
const path = require('path'); | |
const spawn = require('child_process').spawn; | |
const FPS = 60; | |
const MICROSEC_PER_FRAME = Math.round(1000000 / FPS); | |
if (process.argv.length < 3) { | |
console.log(`node ${path.relative('.', process.argv[1])} [DevToolsProfile]`); | |
process.exit(1); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def getPeaks(A): | |
peaks = [-1] * len(A) | |
for i in xrange(1, len(A) - 1): | |
if A[i] > A[i - 1] and A[i] > A[i + 1]: | |
peaks[i] = 0 | |
return peaks | |
def getNumPeaks(A): | |
N = len(A) | |
peaks = getPeaks(A) |
Short url: https://goo.gl/vsZxUT
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# \curl -L http://goo.gl/mA4qmE | |
pkgs=( | |
# X | |
xorg-server | |
xorg-server-utils | |
xorg-xinit | |
# archiver |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# \curl -L http://goo.gl/iS4JAG | |
sudo pacman -S yajl | |
curl -O https://aur.archlinux.org/packages/pa/package-query/package-query.tar.gz | |
tar zxvf package-query.tar.gz | |
cd package-query | |
makepkg -si | |
cd .. | |
curl -O https://aur.archlinux.org/packages/ya/yaourt/yaourt.tar.gz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copyright 2012 i-MD. All rights reserved. | |
import scala.sys.process._ | |
object ImdEngTeam { | |
lazy val contact = "echo dEBpLW1kLmNvbQ== | base64 -d"!! | |
def main(args: Array[String]) { | |
EngCandidates.filter { c => |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Cache = function(namespace) { | |
this.namespace = namespace; | |
this.store = Application.storage; | |
}; | |
Cache.prototype = { | |
_: function(key) { | |
return this.namespace + '-' + key; | |
}, | |
has: function(key) { | |
return this.store.has(this._(key)); |