This file contains hidden or 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
#################################### | |
# BASIC REQUIREMENTS | |
# http://graphite.wikidot.com/installation | |
# http://geek.michaelgrace.org/2011/09/how-to-install-graphite-on-ubuntu/ | |
# Last tested & updated 10/13/2011 | |
#################################### | |
cd | |
sudo apt-get update | |
sudo apt-get upgrade |
This file contains hidden or 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
# Install NodeJS | |
sudo apt-get install python-software-properties git-core | |
sudo add-apt-repository ppa:chris-lea/node.js | |
sudo apt-get update | |
sudo apt-get install nodejs npm | |
# Install Statsd | |
git clone https://github.com/etsy/statsd.git |
This file contains hidden or 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 | |
# WARNING: Don't use this in production since all passwords are kept at their default. | |
# mongodb | |
apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10 | |
echo -e "deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen\n" > /etc/apt/sources.list.d/mongodb-10gen.list | |
apt-get update | |
apt-get install -y mongodb-10gen |
This file contains hidden or 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
env=prod | |
topic=pns.stream | |
group=renderered | |
kafka-run-class.sh kafka.tools.GetOffsetShell --broker-list kafka-seed-1.${env}.livefyre.com:9092 --topic ${topic} --time -1 | perl -pe s/\(${topic}\):\(\\d+:\\d+\)/\\/consumers\\/${group}\\/offsets\\/\$1\\/\$2/ | kafka-run-class.sh kafka.tools.ImportZkOffsets --zkconnect zk-seed-1.${env}.livefyre.com --input-file /dev/stdin |
This file contains hidden or 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
pbpaste | highlight -O rtf /dev/stdin --font-size 34 --font Menlo --style molokai -W -J 80 -j 3 --src-lang java | pbcopy |
This file contains hidden or 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 re | |
import sys | |
import subprocess | |
from collections import defaultdict | |
def move_tail(topic, groups, path="/opt/kafka/bin/", env="staging"): | |
command = r"%skafka-run-class.sh kafka.tools.GetOffsetShell --broker-list kafka-seed-1.%s.livefyre.com:9092 --topic %s --time -1 " | |
cli = command % (path, env, topic) | |
proc = subprocess.Popen(cli, stdout=subprocess.PIPE, shell=True) | |
(out, err) = proc.communicate() |
This file contains hidden or 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
on run {input, parameters} | |
tell application "System Events" | |
set activeApp to name of first application process whose frontmost is true | |
if "Mail" is in activeApp then | |
tell application "Mail" | |
-- Collect the rules that already exist | |
set ruleNames to {} | |
repeat with ruleNumber from 1 to count rules |
This file contains hidden or 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 MockEventFactory | |
import javax.enterprise.event.Event | |
import org.junit.runner.RunWith | |
import org.scalamock.scalatest.MockFactory | |
import org.scalatest.junit.JUnitRunner | |
import org.scalatest.FlatSpec | |
@RunWith(classOf[JUnitRunner]) | |
class ExampleSpec extends FlatSpec with MockFactory with MockEventFactory { |
This file contains hidden or 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 rebase --onto <target> <common-forkpoint> <feature> | |
will detach <feature> from <common-forkpoint> and reattach on top of <target> |
This file contains hidden or 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 user = User.get("<your user id>") | |
user.getProperty(hudson.plugins.favorite.user.FavoriteUserProperty.class).data.clear() | |
user.save() | |
// Execute here: | |
http://lfbuild.corp.adobe.com:8080/script |
OlderNewer