⌘T | go to file |
⌘⌃P | go to project |
⌘R | go to methods |
⌃G | go to line |
⌘KB | toggle side bar |
⌘⇧P | command prompt |
This file contains hidden or 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
<?php | |
use Symfony\Component\HttpFoundation\File\File; | |
use Symfony\Component\HttpFoundation\File\UploadedFile; | |
/** | |
* @Entity | |
*/ | |
class Document | |
{ |
This file contains hidden or 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
# The loopback network interface | |
auto lo eth0 | |
iface lo inet loopback | |
iface eth0 inet dhcp | |
iface eth0 inet6 static | |
address 2a00:1158:X::XX #<- Your IPv6 Address | |
netmask 64 # <- No slashes | |
gateway fe80::1 #<- Gateway |
This file contains hidden or 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 crc32 = require('buffer-crc32'); // npm install buffer-crc32; | |
var crc = require('crc'); // npm install crc | |
var str = "Hello CRC"; | |
var strUTF8= "<!DOCTYPE html>\n<html>\n<head>\n</head>\n<body><p>自動販売</p></body></html>"; | |
var bufUTF8 = new Buffer(strUTF8); | |
var bufStr = new Buffer(str); | |
// Example 1 |
This file contains hidden or 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
## License | |
(The MIT License) | |
Copyright (c) 2011 TJ Holowaychuk <[email protected]> | |
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, |
This file contains hidden or 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
{ | |
"name": "XXX", | |
"version": "0.0.1", | |
"dependencies": { | |
"argparser": { | |
"version": "0.2.1" | |
}, | |
"async": { | |
"version": "0.1.22" | |
}, |
This file contains hidden or 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 appjs = require('appjs'); | |
// serve static files from a directory | |
appjs.serveFilesFrom(__dirname + '/content'); | |
// handle requests from the browser | |
appjs.router.post('/', function(request, response, next){ | |
response.send('Hey! How are you ' + request.post('firstname')); | |
}) |
This file contains hidden or 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
/** | |
* npm install carrier | |
* npm install parser | |
* tail -f /tmp/json.log | node logtest.js | |
* | |
* Logfile example: | |
* {"level":"info","message":"beep boop"} | |
* {"level":"error","message":"foo bar"} | |
*/ |
This file contains hidden or 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 sortObject(o) { | |
var sorted = {}, | |
key, a = []; | |
for (key in o) { | |
if (o.hasOwnProperty(key)) { | |
a.push(key); | |
} | |
} |
This file contains hidden or 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 longText = "Super Duper Long Description from the manual for the dashboard"; | |
var shortText = "Main Screen"; | |
var shortTxt = function(txt,max,fill) { | |
var sTxt = txt, | |
max = max || 12, | |
fill = fill || '...'; | |
if(txt.length>=max){ |