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
package com.firebase.sandbox; | |
import java.awt.Color; | |
import java.awt.image.BufferedImage; | |
import java.io.File; | |
import javax.imageio.ImageIO; | |
import org.json.JSONObject; | |
public class Png2Json { | |
public static void main(String[] args) { |
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 | |
# | |
# seek and kill a mem hog fork()'d child | |
# | |
SEEK="stud" | |
SNOOZE="6000" | |
while [ : ]; do | |
echo Snoozing for $SNOOZE |
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/perl -w | |
# display linux interface bandwidths on a regular interval | |
# dep: yum -y install perl-Time-HiRes | |
# Copyright (c) 2005 Dean Gaudet <dean@arctic.org> | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a | |
# copy of this software and associated documentation files (the "Software"), |
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
var naturalDist = "abcdefghiklmnopqrstuvwxyz"; | |
var scrabbleDist = "aaaaaaaaabbccddddeeeeeeeeeeeeffggghhiiiiiiiiijkllllmmnnnnnnooooooooppqrrrrrrssssttttttuuuuvvwwxyyz"; | |
var englishDist = "aaaaaaaabbcccddddeeeeeeeeeeeefffgghhhhhhiiiiiiijkllllmmnnnnnnnooooooooppqrrrrrrssssssstttttttttuuuvwwwxyyz"; |
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
# Courtesy @marius, April 2012 | |
# | |
# "Our most common type of system are mostly stateless, high volume, | |
# low latency RPC systems. For these, we generally use this template:" | |
HEAP_OPTS="-Xmx17G -Xms17G -XX:NewSize=15G -XX:+UseNUMA" | |
GC_OPTS="-XX:+UseConcMarkSweepGC -XX:SurvivorRatio=40 -XX:+CMSScavengeBeforeRemark" | |
GC_LOG_OPTS="-verbosegc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCDateStamps -XX:+PrintTenuringDistribution -XX:+PrintHeapAtGC" | |
GC_LOG="-Xloggc:/var/log/$APP_NAME/gc.log" | |
DEBUG_OPTS="-XX:ErrorFile=/var/log/$APP_NAME/java_error%p.log" |
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
package sandbox; | |
import java.util.HashMap; | |
import java.util.Map; | |
import java.util.concurrent.ConcurrentHashMap; | |
import java.util.concurrent.CountDownLatch; | |
import org.apache.commons.lang3.time.StopWatch; | |
public class LockOnLocksOnLocks { |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<title>websocket playground</title> | |
<meta charset="utf-8"> | |
<meta name="description" content="Quick, dirty, and in-browser websocket playground"> | |
<meta name="author" content="@vikrum5000"> | |
<link rel="stylesheet" href="http://twitter.github.com/bootstrap/1.3.0/bootstrap.min.css"> | |
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script> | |
<style type="text/css"> |
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
/** | |
* <p> | |
* This file is licensed under the MIT License as read at | |
* http://www.opensource.org/licenses/mit-license.php | |
* and reproduced here:</p> | |
* | |
* <blockquote>Copyright (c) 2009 Robert Harder. | |
* Permission is hereby granted, free of charge, to any person obtaining a copy | |
* of this software and associated documentation files (the "Software"), to deal | |
* in the Software without restriction, including without limitation the rights |
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
curl -so /dev/null -w "url_effective = %{url_effective}\n http_code = %{http_code}\n http_connect = %{http_connect}\n time_total = %{time_total}\n time_namelookup = %{time_namelookup}\n time_connect = %{time_connect}\n time_appconnect = %{time_appconnect}\n time_pretransfer = %{time_pretransfer}\n time_redirect = %{time_redirect}\n time_starttransfer = %{time_starttransfer}\n size_download = %{size_download}\n size_upload = %{size_upload}\n size_header = %{size_header}\n size_request = %{size_request}\n speed_download = %{speed_download}\n speed_upload = %{speed_upload}" https://zzz |
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
/* .. spin .. | |
* | |
* $ gcc spin.c -o spin -lncurses -Wall -O3 | |
* | |
* vsn - 2006 | |
*/ | |
#include <stdlib.h> // srand | |
#include <time.h> // time | |
#include <string.h> |