Skip to content

Instantly share code, notes, and snippets.

View johnistan's full-sized avatar

John Dennison johnistan

  • Apple
  • Boulder, CO
View GitHub Profile
➜ pykafka git:(master) source activate pykafka-dev
discarding /home/vagrant/miniconda/bin from PATH
prepending /home/vagrant/miniconda/envs/pykafka-dev/bin to PATH
(pykafka-dev)➜ pykafka git:(master) pip install -r ./test-requirements.txt
Collecting pytest (from -r ./test-requirements.txt (line 1))
Using cached pytest-2.9.0-py2.py3-none-any.whl
Collecting pytest-cov (from -r ./test-requirements.txt (line 2))
Using cached pytest_cov-2.2.1-py2.py3-none-any.whl
Collecting python-snappy (from -r ./test-requirements.txt (line 3))
Collecting mock (from -r ./test-requirements.txt (line 4))
stop all celery-beat
ssh celery-manager00
sudo su -
puppet agent --disable "se-platform scoring fix"
supervisorctl stop celery-beat
# deploy puppet branches
# double triple check .env
This file has been truncated, but you can view the full file.
# ************************************************************
# Sequel Pro SQL dump
# Version 4096
#
# http://www.sequelpro.com/
# http://code.google.com/p/sequel-pro/
#
# Host: db00.se.elektra.qa (MySQL 5.5.37-0ubuntu0.12.04.1-log)
# Database: sedb
# Generation Time: 2014-07-10 23:13:56 +0000
@johnistan
johnistan / imageFromClipBoardJava
Created October 12, 2012 00:19
GWT onPaste function
public void onPaste(String newImageData ){
Log.debug("paste in java!!!!");
Image newImageWidget = new Image();
newImageWidget.setVisible(true);
newImageWidget.setUrl(newImageData);
}
@johnistan
johnistan / imageCopyListenerGWT
Created October 11, 2012 23:34
Image Copy from Clipboard GWT/Chrome solution
public native void copyListener() /*-{
var temp = this //hackish way to maintain this
var reader = new $wnd.FileReader();
var blob;
reader.onloadend = (function(event){
return function(){
console.log("ahhhhhh in da' file reader!!!!");
console.log(this.result);
@johnistan
johnistan / imageFromClipBoard.js
Created September 26, 2012 17:06
Image Copy from Clipboard - Chrome only
$doc.onpaste = function(event){
var items = event.clipboardData.items;
console.log(JSON.stringify(items)); // will give you the mime types
var blob = items[0].getAsFile(); //really should loop through
var reader = new $wnd.FileReader();
reader.onloadend = (function(event){
return function(){
var image = new Image();
image.title = "test";
console.log(this.result);
@johnistan
johnistan / Lehmann.R
Created December 20, 2011 16:54
Lehmann Primality Test in R
primeTest <- function(n, iter){
a <- sample(1:(n-1), 1)
lehmannTest <- function(y, tries){
x <- ((y^((n-1)/2)) %% n)
if (tries == 0) {
return(TRUE)
}else{
if ((x == 1) | (x == (-1 %% n))){
lehmannTest(sample(1:(n-1), 1), (tries-1))
}else{