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 bash | |
# ./getPitchers.sh <apiKey> | |
CAMS=$(curl -s -L -X GET \ | |
https://developer-api.nest.com/devices/cameras/ \ | |
-H "authorization: Bearer ${1}" \ | |
-H 'cache-control: no-cache' \ | |
-H 'content-type: application/json') |
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
$ModLoad imuxsock # provides support for local system logging | |
$ModLoad imklog # provides kernel logging support | |
$ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat | |
$FileOwner root | |
$FileGroup root | |
$FileCreateMode 0640 | |
$DirCreateMode 0755 | |
$Umask 0022 | |
$WorkDirectory /var/spool/rsyslog | |
$IncludeConfig /etc/rsyslog.d/*.conf |
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
import java.util.List; | |
import java.nio.ByteBuffer; | |
import java.io.IOException; | |
import kafka.consumer.Consumer; | |
import kafka.consumer.ConsumerConfig; | |
import kafka.consumer.ConsumerIterator; | |
import kafka.consumer.KafkaStream; | |
import kafka.javaapi.consumer.ConsumerConnector; |
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
# Create background noise profile from mp3 | |
/usr/bin/sox noise.mp3 -n noiseprof noise.prof | |
# Remove noise from mp3 using profile | |
/usr/bin/sox input.mp3 output.mp3 noisered noise.prof 0.21 | |
# Remove silence from mp3 | |
/usr/bin/sox input.mp3 output.mp3 silence -l 1 0.3 5% -1 2.0 5% | |
# Remove noise and silence in a single command |
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 node | |
// Configuration | |
var argv = require('optimist') | |
.usage('Usage: $0 --prefix index_prefix [options]') | |
.demand(['prefix']) | |
.describe({ | |
host: 'Elastic Search host', | |
port: 'Elastic Search port', | |
secure: 'Use secure Elastic Search connection', |
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 | |
# Set this to your internet-facing network interface: | |
WAN_INTERFACE=eth0 | |
# Set this to your local network interface: | |
LAN_INTERFACE=bond0 | |
# How fast is your downlink? | |
MAX_DOWNRATE=12288kbit |
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 Dictionary = function() { | |
this.keys = {}; | |
this.length = 0; | |
this.defaultValue = null; | |
}; | |
Dictionary.prototype.store = function(key, value) { | |
this.keys[key] = value; | |
this.length++; | |
}; |