To run this, simply run:
python cassandra-cql.py hostname port script_file [-f]
This will soon be packaged for pip.
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |
| cassandra_config.py | |
| *.pyc | |
| project/ |
| #! /bin/sh | |
| ### BEGIN INIT INFO | |
| # Provides: cassandra | |
| # Required-Start: $remote_fs $network $named $time | |
| # Required-Stop: $remote_fs $network $named $time | |
| # Should-Start: ntp mdadm | |
| # Should-Stop: ntp mdadm | |
| # Default-Start: 2 3 4 5 | |
| # Default-Stop: 0 1 6 | |
| # Short-Description: distributed storage system for structured data |
To eliminate the need to constantly type out the ticket information at the beginning of a commit message, this script uses the built in git hook system to prepend commits with the ticket information from the branch name. For example, if your branch is named:
b-51392/fixed-minor-visual-bug
the hook will grab the ticket information at the beginning of the branch name and prepend it to your comments:
$ git commit -m "Test commit message"
[b-51392/fixed-minor-visual-bug 74cfe0e] B-51392: Test commit message.
| #!/bin/bash | |
| # This script will sum the "Total" speeds that are put out in every test. | |
| READ_FILE=$1 | |
| results=$(cat $READ_FILE | grep Total: | sed -e "s/\[.*\] Total: //g" | sed -e "s/khash\/s//g") | |
| total=0 | |
| elements=0 | |
| for i in ${results[@]}; do |
| <?php | |
| $new_array = array(); | |
| for ($i = 0; $i < intval(count($old_array)/2); $i++) { | |
| $new_array[$old_array[2*$i]] = $old_array[2*$i+1]; | |
| } |
| .DS_Store |
| { | |
| "1" : { | |
| "date" : "2014-08-13", | |
| "count" : 5 | |
| }, | |
| "2" : { | |
| "date" : "2014-08-14", | |
| "count" : 3 | |
| } | |
| } |
| #!/bin/bash | |
| # command -v lsb_release >/dev/null 2>&1 || { echo "This script requires lsb_release, but the command is not available." >&2; exit 1; } | |
| # echo -e "This script will need to be run as root. To view the source of this script, visit:\n" | |
| YOUR_INSTALL=$(head -1 /etc/issue | sed 's/ \\n \\l//') |