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
begin | |
require 'pivotal_tracker' | |
rescue LoadError | |
puts "This script requires the pivotal-tracker gem: gem install pivotal-tracker" | |
exit(1) | |
end | |
CLIENT_TOKEN = 'GET YER OWN' | |
PROJECT_ID = 12345 | |
MILESTONE_LABELS = ['m1', 'm2', 'm3', 'm4'] |
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/sh | |
loop_count=10000 | |
while [ $loop_count -gt 0 ]; do | |
clear | |
ls -l /data/server/current | |
uptime | |
ps wax --forest | grep [u]nicorn | |
sleep 1 | |
echo "Refreshing..." |
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
require "base64" | |
require 'openssl' | |
require 'iconv' | |
CIPHER = "aes-256-cbc" | |
#http://www.ruby-doc.org/ruby-1.9/classes/OpenSSL/PKCS5.html | |
PASSPHRASE = "12345" | |
IV = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16].pack("c*") |
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 javax.crypto.Cipher; | |
import java.security.spec.KeySpec; | |
import javax.crypto.spec.PBEKeySpec; | |
import javax.crypto.SecretKey; | |
import javax.crypto.spec.SecretKeySpec; | |
import javax.crypto.SecretKeyFactory; | |
import java.security.AlgorithmParameters; | |
import javax.crypto.spec.IvParameterSpec; | |
public class Decrypter { |
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
#If you see 1 on the terminal, that's success. 0 is bad. | |
require 'rubygems' | |
require 'base64' | |
require 'json' | |
event_hash = {} | |
event_hash['event'] = "app_start" | |
event_hash['properties'] = {:token => "4130e0e1bf5ade215e80ebc0b7765b6f", :time => Time.now.to_i, :publisher_id => "1234", :app_id => "5678", :start_time => Time.now.to_i} |
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
#If you see 1 on the terminal, that's success. 0 is bad. | |
require 'rubygems' | |
require 'base64' | |
require 'json' | |
event_hash = {} | |
event_hash['event'] = "app_time" | |
event_hash['properties'] = {:token => "4130e0e1bf5ade215e80ebc0b7765b6f", :publisher_id => "1234", :app_id => "5678", :time => Time.now.to_i, :duration => rand(10000)} |
NewerOlder