Just install this in your apps like so:
gem 'test-spec-mini', :git => 'git://gist.github.com/1806986.git', :require => 'mini'
| #!/bin/sh | |
| exec scala $0 "$@" | |
| !# | |
| import scala.collection.JavaConversions._ | |
| import java.lang.management.{ManagementFactory, MemoryMXBean} | |
| import java.net.URI | |
| import javax.management.JMX | |
| import javax.management.remote.{JMXConnectorFactory, JMXServiceURL} |
| #!/usr/bin/env ruby | |
| # Usage: gitio URL [CODE] | |
| # | |
| # Turns a github.com URL | |
| # into a git.io URL | |
| # | |
| # Copies the git.io URL to your clipboard. | |
| url = ARGV[0] | |
| code = ARGV[1] |
Just install this in your apps like so:
gem 'test-spec-mini', :git => 'git://gist.github.com/1806986.git', :require => 'mini'
| import akka.actor.Actor | |
| import akka.actor.ActorSystem | |
| import akka.agent.Agent | |
| import com.typesafe.config.ConfigFactory | |
| import akka.event.Logging | |
| import akka.actor.Props | |
| import kafka.utils.Utils | |
| import java.nio.ByteBuffer | |
L1 cache reference ......................... 0.5 ns
Branch mispredict ............................ 5 ns
L2 cache reference ........................... 7 ns
Mutex lock/unlock ........................... 25 ns
Main memory reference ...................... 100 ns
Compress 1K bytes with Zippy ............. 3,000 ns = 3 µs
Send 2K bytes over 1 Gbps network ....... 20,000 ns = 20 µs
SSD random read ........................ 150,000 ns = 150 µs
Read 1 MB sequentially from memory ..... 250,000 ns = 250 µs
| import scala.util.parsing.combinator.RegexParsers | |
| /** | |
| * Simple parser for a key value string like: | |
| * key01 = Value01 key02=value02 key03 =value03 key04= value04 | |
| * | |
| * The parser does not support whitespace in key or values. | |
| */ | |
| object KeyValueParser extends RegexParsers { | |
| --- | |
| #### | |
| #### THIS IS OLD AND OUTDATED | |
| #### LIKE, ANSIBLE 1.0 OLD. | |
| #### | |
| #### PROBABLY HIT UP https://docs.ansible.com MY DUDES | |
| #### | |
| #### IF IT BREAKS I'M JUST SOME GUY WITH | |
| #### A DOG, OK, SORRY | |
| #### |
| # Makefile for a go project | |
| # | |
| # Author: Jon Eisen | |
| # site: joneisen.me | |
| # | |
| # Targets: | |
| # all: Builds the code | |
| # build: Builds the code | |
| # fmt: Formats the source files | |
| # clean: cleans the code |
| #!/bin/sh | |
| ### | |
| # SOME COMMANDS WILL NOT WORK ON macOS (Sierra or newer) | |
| # For Sierra or newer, see https://github.com/mathiasbynens/dotfiles/blob/master/.macos | |
| ### | |
| # Alot of these configs have been taken from the various places | |
| # on the web, most from here | |
| # https://github.com/mathiasbynens/dotfiles/blob/5b3c8418ed42d93af2e647dc9d122f25cc034871/.osx |
| // This is an example of how to reason about covariance vs contravariance. | |
| // Between the two co*.reasoning.scala examples, the following compiles but meaning is slightly different due to the class hierarchy. | |
| type SHORT = A[SMALL] | |
| type INT = A[MEDIUM] | |
| type LONG = A[LARGE] | |
| val s:SHORT = new SHORT() | |
| val i:INT = s |