View loop.js
<body></body>
<script src="http://gamingJS.com/Three.js"></script>
<script src="http://gamingJS.com/ChromeFixes.js"></script>
<script>
// This is where stuff in our game will happen:
var scene = new THREE.Scene();
// This is what sees the stuff:
var aspect_ratio = window.innerWidth / window.innerHeight;
var camera = new THREE.PerspectiveCamera(75, aspect_ratio, 1, 10000);
View tube_loop.js
// start at, stop before 20, increase i by 1
for (var i=0;i<20; i += 1) {
var cover = new THREE.MeshNormalMaterial();
var cylinder = new THREE.CylinderGeometry(125, 125, 125, 30);
var tube = new THREE.Mesh(cylinder, cover);
// x values changes with the i value so they don't overlap
tube.position.set(-1000 + i*300, 0, -50);
scene.add(tube);
View README
VBoxManage internalcommands createrawvmdk -filename ~/usb.vmdk -rawdisk /dev/disk1
View R: Predictions with a Linear Model
> house.size <- c(1400, 2400, 1800, 1900, 1300, 1100)
> house.cost <- c(112000, 192000, 144000, 152000, 104000, 88000)
> plot(house.size, house.cost)
> fit <- lm(house.cost ~ house.size)
> abline(fit)
> predict(fit, newdata=data.frame(house.size=c(1300)), se.fit=TRUE)
$fit
1
View Lending Club API Curl
# Request account summary in CSV
curl -v -H "Authorization: <API KEY>" -H "Accept:text/plain" -XGET https://api.lendingclub.com/api/investor/v1/accounts/<ACCOUNT ID>/summary
# Get current listings
curl -v -H "Authorization: <API KEY>" -H "Accept:text/plain" -XGET https://api.lendingclub.com/api/investor/v1/loans/listing
View R Snippets
# Split into training and test sets
trainIndex <- createDataPartition(students$grade, p = 0.9,
list = FALSE,
times = 1)
studentsTrain <- students[ trainIndex,]
studentsTest <- students[-trainIndex,]
# Create a proportion table
prop.table(table(loansTrain$default))
View git branch cleanup
Rename branch
git branch -m <oldName> <newName>
Delete local branch
git branch -D <branchName>
Delete local and remote branch
git push origin --delete <branchName>
Delete remote reference from local repo
View gist:c43a80a56d5931e09bd2
Remove config entries:
git config -f .git/config --remove-section submodule.$submodulepath
git config -f .gitmodules --remove-section submodule.$submodulepath
Remove directory from index:
git rm --cached $submodulepath
Commit
Delete unused files:
rm -rf $submodulepath
rm -rf .git/modules/$submodulepath