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
__author__ = 'Shawn Poindexter' | |
import sys | |
primes = [3, 5, 7, 11, 13, 17, 19, 23, 29, 31] | |
prime_sum_table = [[(x + y) in primes for y in range(19)] for x in range(19)] | |
saved_solutions = {} |
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
# launch tmux if connecting via ssh | |
if command -v tmux>/dev/null; then | |
[[ ! -z $SSH_CONNECTION ]] && [[ ! $TERM =~ screen ]] && [ -z $TMUX ] && exec sh -c 'tmux a || tmux' | |
fi |
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 | |
# Copyright (c) 2011 Float Mobile Learning | |
# http://www.floatlearning.com/ | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining | |
# a copy of this software and associated documentation files (the "Software"), | |
# to deal in the Software without restriction, including without limitation | |
# the rights to use, copy, modify, merge, publish, distribute, sublicense, | |
# and/or sell copies of the Software, and to permit persons to whom 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
package main | |
import ( | |
"fmt" | |
"time" | |
"google.golang.org/cloud/storage" | |
) | |
const ( |
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
var gcloud = require('gcloud'); | |
var uuid = require('uuid'); | |
// Google Cloud Storage Bucket Name | |
const BUCKET_NAME = 'bucket-name'; | |
// Google Developer Console project ID | |
const PROJECT_ID = 'project-1234'; | |
/* Google Developer Console -> API Manager -> Credentials -> | |
Add credentials -> Service account -> JSON -> Create */ | |
const KEY_FILENAME = 'project-0d3d97832ca7.json' // relative path |
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
function setjdk() { | |
if [ $# -ne 0 ]; then | |
removeFromPath '/System/Library/Frameworks/JavaVM.framework/Home/bin' | |
if [ -n "${JAVA_HOME+x}" ]; then | |
removeFromPath $JAVA_HOME | |
fi | |
export JAVA_HOME=`/usr/libexec/java_home -v $@` | |
export PATH=$JAVA_HOME/bin:$PATH | |
fi | |
} |