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
<?xml version="1.0"?> | |
<!-- | |
ADOBE SYSTEMS INCORPORATED | |
Copyright 2005-2007 Adobe Systems Incorporated | |
All Rights Reserved. | |
NOTICE: Adobe permits you to use, modify, and distribute this file | |
in accordance with the terms of the license agreement accompanying it. |
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.yaymedia.openvue; | |
import java.util.Collections; | |
import java.util.List; | |
import com.wowza.wms.amf.AMFDataList; | |
import com.wowza.wms.application.IApplicationInstance; | |
import com.wowza.wms.client.IClient; | |
import com.wowza.wms.module.ModuleBase; | |
import com.wowza.wms.request.RequestFunction; | |
import com.yaymedia.openvue.domain.CompositeWhiteboardEventListener; |
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
git diff --cached --name-status | while read st file; do | |
# skip deleted files | |
if [ "$st" == 'D' ]; then continue; fi | |
# do a check only on the puppet files | |
if [[ "$file" =~ ".pp" ]]· | |
then | |
echo "syntax checking \"$file\""· | |
if ! puppet --confdir=/tmp --vardir=/tmp --parseonly --ignoreimport "$file" | |
then | |
echo "puppet syntax check failed for file: $file" |
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
use Net::StatsD::Client; | |
use strict; | |
my $client = Net::StatsD::Client->new(host=>"your-statsd-host-here"); | |
while(<>){ | |
my ($host,$service,$perfdata) = split(/~/); | |
$host =~ s/\./-/g; | |
$service =~ s/ /_/g ; | |
my $prefix= "nagios." . $host . "." . $service; |
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
#!/opt/csw/bin/ruby | |
# | |
# | |
require 'socket' | |
def normalize_size(size) | |
multiples={'K' => (1024), | |
'M' => (1024 * 1024), | |
'G' => (1024 * 1024 * 1024), | |
'T' => (1024 * 1024 *1024 *1024) |
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
#!/opt/csw/bin/ruby | |
# | |
# run with something like iostat -nx 10 | iostat_to_graphite.rb | |
# | |
require 'socket' | |
graphite_host='graphite' | |
graphite_port=2003 |
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
url_to_ips = cloudfront_urls.collect{|url|[url,dns_servers.collect{|server| dns.resolve(server,url.host)}.flatten]}.collect{|(url,ips)| ips.collect{|ip| | |
[url.to_s,ip,Net::HTTP::start(ip,80){ |http| http.get(url.path,{"Host"=>url.host}).code}] | |
}}.flatten(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 toQuadList()= { | |
def lrQuadsFromLine(line: List[Int], accumulator: List[List[Int]]): List[List[Int]] = { | |
if (line.length < 4) | |
accumulator | |
else | |
lrQuadsFromLine(line.tail, accumulator :+ line.slice(0, 4)) | |
} | |
data.flatMap(line => lrQuadsFromLine(line, List.empty)) | |
} |
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
object Sudoku extends App { | |
val ints = (1 to 9).toSet | |
val start = List( | |
0, 0, 0, 0, 0, 0, 0, 6, 0, | |
0, 0, 0, 0, 5, 3, 0, 0, 9, | |
5, 2, 0, 0, 0, 8, 0, 1, 0, | |
0, 0, 1, 0, 6, 0, 0, 2, 4, | |
2, 0, 0, 0, 0, 0, 0, 0, 8, |
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 python | |
# Git clone all my gists | |
import json | |
import urllib | |
from subprocess import call | |
from urllib import urlopen | |
import os | |
USER = os.environ['USER'] |
OlderNewer