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 tilesSrc = 'img/gods.png', | |
tilesCanvas = null, | |
tilesImg = null; | |
function getCanvasFromImage(image) { | |
var canvas = document.createElement('canvas'); | |
canvas.width = image.naturalWidth; | |
canvas.height = image.naturalHeight; |
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
# this will redirect any incoming requests on port 80 to port 8080 | |
ipfw add 1443 fwd 127.0.0.1,8080 tcp from any to me 80 in |
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
# will send--debug=7001 --trace-deprecation to nodejs executable | |
pm2 start myServer.js --node-args="--debug=7001 --trace-deprecation" |
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
# -p 8080 will be sent to your myServer.js and accessible through process.argv array | |
pm2 start myServer.js -- -p 8080 |
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
pm2 start myServer.js --watch |
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
pm2 monit |
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
{ online: true, success: true, pid: 1113, pm2_version: '0.8.13' } | |
PM2 Process launched | |
ββββββββββββ¬βββββ¬ββββββββββ¬βββββββ¬βββββββββ¬ββββββββββββ¬βββββββββ¬ββββββββββββββ¬ββββββββββββββ | |
β App name β id β mode β PID β status β restarted β uptime β memory β watching β | |
ββββββββββββΌβββββΌββββββββββΌβββββββΌβββββββββΌββββββββββββΌβββββββββΌββββββββββββββΌββββββββββββββ€ | |
β server β 0 β cluster β 1114 β online β 0 β 0s β 29.738 MB β unactivated β | |
β server β 1 β cluster β 1115 β online β 0 β 0s β 29.934 MB β unactivated β | |
β server β 2 β cluster β 1116 β online β 0 β 0s β 30.063 MB β unactivated β | |
β server β 3 β cluster β 1117 β online β 0 β 0s β 29.703 MB β unactivated β | |
β server β 4 β cluster β 1118 β online β 0 β 0s β 30.293 MB β unactivated β |
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
pm2 start myServer.js -i max |
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
@Override | |
public void onBackPressed() { | |
// finish() is called in super: we only override this method to be able to override the transition | |
super.onBackPressed(); | |
overridePendingTransition(R.anim.activity_back_in, R.anim.activity_back_out); | |
} |
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
@Override | |
public boolean onOptionsItemSelected(MenuItem item) { | |
// Handle action bar item clicks here. The action bar will | |
// automatically handle clicks on the Home/Up button, so long | |
// as you specify a parent activity in AndroidManifest.xml. | |
int id = item.getItemId(); | |
switch(id) { | |
// ... |
NewerOlder