README is 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
[Unit] | |
Description=Apache Flink | |
[Service] | |
Type=forking | |
User=ec2-user | |
ExecStart=/home/ec2-user/flink/bin/start-cluster.sh | |
ExecStop=-/home/ec2-user/flink/bin/stop-cluster.sh | |
Restart=always | |
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
-- show running queries (pre 9.2) | |
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query | |
FROM pg_stat_activity | |
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%' | |
ORDER BY query_start desc; | |
-- show running queries (9.2) | |
SELECT pid, age(clock_timestamp(), query_start), usename, query | |
FROM pg_stat_activity | |
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%' |
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
/* | |
The contract is free software: you can redistribute it and/or modify | |
it under the terms of the GNU lesser General Public License as published by | |
the Free Software Foundation, either version 3 of the License, or | |
(at your option) any later version. | |
The contract is distributed in the hope that it will be useful, | |
but WITHOUT ANY WARRANTY; without even the implied warranty of | |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
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
SELECT CEILING(Total_InnoDB_Bytes*1.2/POWER(1024,3)) RIBPS FROM | |
(SELECT SUM(data_length+index_length) Total_InnoDB_Bytes | |
FROM information_schema.tables WHERE engine='InnoDB') A; |
Prereq:
apt-get install zsh
apt-get install git-core
Getting zsh to work in ubuntu is weird, since sh
does not understand the source
command. So, you do this to install zsh
wget https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | zsh
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 'mechanize' | |
URL_FILE = 'qc_urls' | |
OUTPUT_FILE = 'qc_urls_out' | |
class QuantcastCrawler | |
class QuantcastURL | |
attr_reader :summary |
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 'neo4j' | |
class Show < Neo4j::Rails::Model | |
property :show_name, type: String, index: :exact | |
has_n :booked_bands | |
end | |
#I have another model, band.rb | |
class Band < Neo4j::Rails::Model |
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
sudo apt-get install openjdk-6-jre-headless | |
curl -O http://dist.neo4j.org/neo4j-community-1.5.M02-unix.tar.gz | |
tar -xf neo4j-community-1.5.M02-unix.tar.gz | |
rm neo4j-community-1.5.M02-unix.tar.gz | |
neo4j-community-1.5.M02/bin/neo4j start |
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
# deploy.rb | |
namespace :ts_remote do | |
task :conf do | |
run <<-CMD | |
cd #{current_release} | |
&& | |
RAILS_ENV=#{rails_env} rake ts:conf | |
&& | |
rsync --progress #{current_release}/config/#{rails_env}.sphinx.conf sphinxsearch@db-server:/home/sphinxsearch/ |
NewerOlder