Skip to content

Instantly share code, notes, and snippets.

View also's full-sized avatar

Ryan Berdeen also

View GitHub Profile
@also
also / gist:9101028
Created February 19, 2014 20:41
thanks opentsdb
net.opentsdb.core.IllegalDataException: Found out of order or duplicate data: cell=Cell([-127, -5], [68, -122, -111, 96]), delta=2079000, prev cell=Cell([-127, -5], [66, -9, -50, -39]), last_delta=2079000, in row=[KeyValue(key=[0, 16, 41, 83, 3, -97, -96, 0, 0, 25, 0, -128, 65], family="t", qualifier=[0, 11, 0, 27, 0, 43, 0, 59, 0, 75, 0, 91, 0, 107, 0, 123, 0, -117, 0, -101, 0, -85, 0, -69, 0, -53, 0, -37, 0, -21, 0, -5, 1, 11, 1, 27, 1, 43, 1, 59, 1, 75, 1, 91, 1, 107, 1, 123, 1, -117, 1, -101, 1, -85, 1, -69, 1, -53, 1, -37, 1, -21, 1, -5, 2, 11, 2, 27, 2, 43, 2, 59, 2, 75, 2, 91, 2, 107, 2, 123, 2, -117, 2, -101, 2, -85, 2, -69, 2, -53, 2, -37, 2, -21, 2, -5, 3, 11, 3, 27, 3, 43, 3, 59, 3, 75, 3, 91, 3, 107, 3, 123, 3, -117, 3, -101, 3, -85, 3, -69, 3, -53, 3, -37, 3, -21, 3, -5, 4, 11, 4, 27, 4, 43, 4, 59, 4, 75, 4, 91, 4, 107, 4, 123, 4, -117, 4, -101, 4, -85, 4, -69, 4, -53, 4, -37, 4, -21, 4, -5, 5, 11, 5, 27, 5, 43, 5, 59, 5, 75, 5, 91, 5, 107, 5, 123, 5, -117, 5, -101, 5, -85, 5, -69, 5, -53, 5, -37
@also
also / error.txt
Last active August 29, 2015 14:07
nashorn error
Exception in thread "main" java.lang.RuntimeException: Method code too large!
at jdk.internal.org.objectweb.asm.MethodWriter.getSize(MethodWriter.java:2065)
at jdk.internal.org.objectweb.asm.ClassWriter.toByteArray(ClassWriter.java:856)
at jdk.nashorn.internal.codegen.ClassEmitter.toByteArray(ClassEmitter.java:577)
at jdk.nashorn.internal.codegen.CompilationPhase$8.transform(CompilationPhase.java:396)
at jdk.nashorn.internal.codegen.CompilationPhase.apply(CompilationPhase.java:513)
at jdk.nashorn.internal.codegen.Compiler.compile(Compiler.java:361)
at jdk.nashorn.internal.runtime.Context.compile(Context.java:1071)
at jdk.nashorn.internal.runtime.Context.compileScript(Context.java:1019)
at jdk.nashorn.internal.runtime.Context.compileScript(Context.java:490)
(def ^:dynamic *dynamic*)
(push-repl-bindings {(var *dynamic*) 1}) ; push-repl-bindings isn't a function
*dynamic*
; => 1
Hello = ->
render: ->
{type: 'div', props: {children: "Hello, #{@props.name}!"}, _isReactElement: true}
React.render {type: Hello, props: {name: 'World'}, _isReactElement: true}, document.body
# ported from http://amix.dk/blog/viewEntry/19367
require 'digest/md5'
class ConsistentHash
def initialize(nodes=nil, replicas=100)
# Manages a hash ring.
# `nodes` is a list of objects that have a proper string representation.
# `replicas` indicates how many virtual points should be used per node,
// Calling Sound.play() after calling SoundChannel.stop() will begin playing
// with an empty buffer.
package {
import flash.display.Sprite;
import flash.events.SampleDataEvent;
import flash.external.ExternalInterface;
import flash.media.Sound;
import flash.media.SoundChannel;
import flash.utils.setTimeout;
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
<mx:Panel title="SoundTouch Demo" width="100%" paddingTop="10" paddingRight="10" paddingBottom="10" paddingLeft="10">
<mx:HBox paddingBottom="10">
<mx:Button id="browseButton" label="Open an MP3…" click="chooseFile();"/>
</mx:HBox>
<mx:VBox width="100%">
<mx:Label text="Tempo"/>
<mx:HSlider id="tempoSlider" minimum="0.01" maximum="1.99" value="1" snapInterval="0.01" liveDragging="false" change="updateFilter();" width="100%"/>
Index: main/src/com/noteflight/standingwave2/output/AudioSampleHandler.as
===================================================================
--- main/src/com/noteflight/standingwave2/output/AudioSampleHandler.as (revision 25)
+++ main/src/com/noteflight/standingwave2/output/AudioSampleHandler.as (working copy)
@@ -115,6 +115,7 @@
var endFrame:Number;
var sample:Sample;
var length:Number;
+ var sampleLength:Number;
<!-- from http://www.p01.org/releases/20_lines_twinkle/ -->
<canvas id="tunnel" width="640" height="480"></canvas>
<script type="text/javascript">
var WIDTH = 640;
var HEIGHT = 480;
var CENTER_X = WIDTH / 2;
var CENTER_Y = HEIGHT / 2;
@also
also / test.sh
Created August 9, 2010 22:14
One file. Valid Ruby, Python, and shell script.
#!/usr/bin/env sh # ruby wants to see its name in the shebang
# valid python, ruby and bash
ignore=""" "
ignore=\
=begin
unset ignore
echo only bash sees this
python $0