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 hbase.sandbox; | |
import java.io.IOException; | |
import org.apache.hadoop.conf.Configuration; | |
import org.apache.hadoop.hbase.HBaseConfiguration; | |
import org.apache.hadoop.hbase.HColumnDescriptor; | |
import org.apache.hadoop.hbase.HTableDescriptor; | |
import org.apache.hadoop.hbase.client.HBaseAdmin; |
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 -e | |
# Neil Williams, reddit | |
# configuration that doesn't change much | |
REDDIT_REPO=git://github.com/reddit/reddit.git | |
I18N_REPO=git://github.com/reddit/reddit-i18n.git | |
APTITUDE_OPTIONS="-y" # limit bandwidth: -o Acquire::http::Dl-Limit=100" | |
# don't blunder on if an error occurs | |
set -e |
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
{ | |
"name": "socket.io.1.0", | |
"version": "1.0.0", | |
"description": "Socket.IO 1.0 using Primus", | |
"main": "socket.io.1.0.js", | |
"scripts": { | |
"test": "echo \"Error: no test specified\" && exit 1" | |
}, | |
"repository": { | |
"type": "git", |
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
cd ~ | |
sudo apt-get update | |
sudo apt-get install openjdk-7-jre-headless -y | |
### Check http://www.elasticsearch.org/download/ for latest version of ElasticSearch and replace wget link below | |
# NEW WAY / EASY WAY | |
wget https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-1.1.1.deb | |
sudo dpkg -i elasticsearch-1.1.1.deb |
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 | |
# herein we backup our indexes! this script should run at like 6pm or something, after logstash | |
# rotates to a new ES index and theres no new data coming in to the old one. we grab metadatas, | |
# compress the data files, create a restore script, and push it all up to S3. | |
TODAY=`date +"%Y.%m.%d"` | |
INDEXNAME="logstash-$TODAY" # this had better match the index name in ES | |
INDEXDIR="/usr/local/elasticsearch/data/logstash/nodes/0/indices/" | |
BACKUPCMD="/usr/local/backupTools/s3cmd --config=/usr/local/backupTools/s3cfg put" | |
BACKUPDIR="/mnt/es-backups/" | |
YEARMONTH=`date +"%Y-%m"` |
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
################################################################## | |
# /etc/elasticsearch/elasticsearch.yml | |
# | |
# Base configuration for a write heavy cluster | |
# | |
# Cluster / Node Basics | |
cluster.name: logng | |
# Node can have abritrary attributes we can use for routing |
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
"::: [Rudyard Kipling][MdJhM6UfRt6pJ836HEjwCQ][ip-10-92-130-29][inet[/10.92.130.29:9300]] | |
65.9% (329.4ms out of 500ms) cpu usage by thread 'elasticsearch[Rudyard Kipling][search][T#22]' | |
8/10 snapshots sharing following 14 elements | |
org.apache.lucene.search.ConstantScoreQuery$ConstantScorer.nextDoc(ConstantScoreQuery.java:257) | |
org.apache.lucene.search.Weight$DefaultBulkScorer.scoreAll(Weight.java:192) | |
org.apache.lucene.search.Weight$DefaultBulkScorer.score(Weight.java:163) | |
org.apache.lucene.search.BulkScorer.score(BulkScorer.java:35) | |
org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:621) | |
org.elasticsearch.search.internal.ContextIndexSearcher.search(ContextIndexSearcher.java:175) |
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
{ | |
"cluster_name": "name_of_cluster", | |
"nodes": { | |
"MdJhM6UfRt6pJ836HEjwCQ": { | |
"timestamp": 1436423508394, | |
"name": "Rudyard Kipling", | |
"transport_address": "inet[/10.92.130.29:9300]", | |
"host": "ip-10-92-130-29", | |
"ip": [ | |
"inet[/10.92.130.29:9300]", |
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
### Keybase proof | |
I hereby claim: | |
* I am naryad on github. | |
* I am naryad (https://keybase.io/naryad) on keybase. | |
* I have a public key whose fingerprint is 4B4B EA57 C2F6 1ED2 DE76 074A 7A31 2DB0 4B41 8AA6 | |
To claim this, I am signing this object: |
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
from selenium import webdriver | |
from getpass import getpass | |
def login_twitter(username, password): | |
driver = webdriver.Firefox() | |
driver.get("https://twitter.com/login") | |
username_field = driver.find_element_by_class_name("js-username-field") | |
password_field = driver.find_element_by_class_name("js-password-field") |
OlderNewer