Assume followings:
/mykeys/.ssh/prodserver.pem
- is a certificate file
umid
- is a user name
111.111.111.111
- is a remote host, that mongodb runs
Topic: Dependent Phabricator reviews | |
Say you have an upstream called master, and a feature branch F1, and a second change that depends on F1, (call it F2). | |
git checkout master | |
git checkout -b F1 | |
# work work | |
git commit -a | |
arc diff | |
git checkout -b F2 # Note that F1 is set as the upstream of F1 | |
# set upstream, in this format git branch -u <remote>/<branch> |
#!/bin/bash | |
mongod --dbpath ./db --logpath ~/mongologs/mongod.log |
We talked about testing
/ debugging
in class today, and I wanted to provide a guide for classmates who are working
on a Javascript stack. There are multiple testing frameworks available in the JS ecosystem, but our group uses:
We subscribe to the Git Featrue Branch workflow, briefly described in that link.
In practice, it works as follows:
git checkout development
git pull origin development
// Setup event listeners | |
function setupEvents() { | |
// Add event listeners for different types of events in the game | |
// code omitted for brevity | |
} | |
// Spawn enemy | |
function spawnEnemy(){ | |
var enemy = new Enemy(); | |
assets.push(enemy) |
const Enemy = function(settings) { | |
// Settings | |
let enemyElement = null | |
// Prevent enemy from escaping the game window | |
function wall() { | |
const enemyRect = enemyElement.getBoundingClientRect() // get the active style values of our moving enemy | |
const w = parseInt(window.innerWidth) |
// Setup event listeners | |
function setupEvents() { | |
document.addEventListener('keyup', function(event){ | |
var keyName = event.key; | |
switch(keyName) { | |
case "ArrowRight": | |
interactions.right = false; | |
break; |
// Move the ball around manually | |
function move(interactions){ | |
if(interactions.up){ | |
playerElement.style.top = parseInt(playerElement.style.top)-8+"px"; | |
} | |
if(interactions.down){ | |
playerElement.style.top = parseInt(playerElement.style.top)+8+"px"; | |
} |
// Create the object asset | |
function create() { | |
// in-line styling is important because we will be using the element's | |
// in-line styling to manipulate it's movement, as above in the move() | |
// function | |
playerElement = document.getElementById('player'); | |
playerElement.style.top = '400px'; | |
playerElement.style.left = '400px'; | |
playerElement.style.height = '100px'; | |
} |