Skip to content

Instantly share code, notes, and snippets.

Avatar

Justin Sanders gigq

View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am gigq on github.
  • I am gigq (https://keybase.io/gigq) on keybase.
  • I have a public key whose fingerprint is D048 7EEF 640C CF79 7859 D37E 5693 BB4A 431E 11CE

To claim this, I am signing this object:

@gigq
gigq / iOS.xml
Created Dec 8, 2013
iOS.xml profile for Plex Media Sever. Copying this to iOS.xml and iOS-iPhone5,1.xml in Profiles allowed AC3 audio from iOS device to AppleTV 3 device. If you are running Plex on a Drobo5N then the location of these files are located in /mnt/DroboFS/Shares/DroboApps/plex/Application/Resources/Profiles
View iOS.xml
<?xml version="1.0" encoding="utf-8"?>
<Client name="iOS">
<TranscodeTargets>
<VideoProfile container="mp4" codec="h264" audioCodec="ac3,aac" context="all">
<!-- Inspired by Handbrake's profiles -->
<Setting name="VideoEncodeFlags" value="-x264opts bframes=3:cabac=1" />
</VideoProfile>
<VideoProfile protocol="hls" container="mpegts" codec="h264" audioCodec="ac3,aac,mp3" context="streaming">
<Setting name="VideoEncodeFlags" value="-x264opts bframes=3:cabac=1" />
</VideoProfile>
@gigq
gigq / main.go
Created Oct 30, 2013
Moves redis list items from a source list to a target list one item at a time. Useful if you use lists as queues and can't rename the key because that would wipe out items in the target queue.
View main.go
package main
import (
"flag"
"log"
"menteslibres.net/gosexy/redis"
"os"
"os/signal"
"time"
)
View PIG-1518-0.7.0.patch
Index: test/org/apache/pig/test/TestSplitCombine.java
===================================================================
--- test/org/apache/pig/test/TestSplitCombine.java (revision 0)
+++ test/org/apache/pig/test/TestSplitCombine.java (revision 0)
@@ -0,0 +1,441 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
View finddupes
find . -name "*.*" -exec basename '{}' \; | sort > /tmp/full
find . -name "*.*" -exec basename '{}' \; | sort | uniq > /tmp/uql
comm -3 /tmp/full /tmp/uql
View TokyoCabinet Benchmark
Results from http://gist.github.com/167477 script.
This test is to see the performance hit on TokyoCabinet BTree DB through TokyoTyrant
as more rows are loaded into the database.
Specifically how long it takes to insert 1000 rows one at a time as the database continues to grow.
This is what I'm seeing on an EC2 small instance.
Measurements are in the number of seconds to insert 1000 rows into TokyoCabinet.
(Batch 1 - 1,000 rows in DB)
@gigq
gigq / gist:167477
Created Aug 13, 2009
tokyobench.rb
View gist:167477
#!/usr/bin/env ruby
require 'rubygems'
require 'tokyotyrant'
require 'uuidtools'
require 'benchmark'
results = File.new("/tmp/tokyoload.csv", "w")
rdb = TokyoTyrant::RDB::new
rdb.open("localhost", 1978)
rdb.vanish
View CouchDB Benchmark
Results from http://gist.github.com/166802 script.
This test is to see the performance hit on CouchDB as more rows are loaded into the database.
Specifically how long it takes to insert 1000 rows in a batch insert as the database continues to grow.
This is what I'm seeing on an EC2 small instance.
Measurements are in the number of seconds to insert that batch of 1000 into CouchDB.
(Batch 1 - 1,000 rows in DB)
1 1.02298092842102
View gist:166802
#!/usr/bin/env ruby
require 'rubygems'
require 'couchrest'
require 'uuidtools'
require 'benchmark'
couch = CouchRest.new("http://localhost:5984")
db = couch.database('couchload')
db.delete! rescue nil
db = couch.create_db('couchload')