Connect the SD card to your computer and open the terminal.
- Find the disk id
df -h
var data = "do shash'owania"; | |
var crypto = require('crypto'); | |
crypto.createHash('md5').update(data).digest("hex"); |
Connect the SD card to your computer and open the terminal.
df -h
CSVParser = function ( options ) { | |
var defaults, delimiter, rowDelimiter, qualifier, qualified, unqualified; | |
options = options || {}; | |
defaults = { | |
delimiter: ',', | |
rowDelimiter: '\n', | |
qualifier: '"' | |
}; |
httpOnly
(and secure
to true
if running over SSL) when setting cookies.csrf
for preventing Cross-Site Request Forgery: http://expressjs.com/api.html#csrfbodyParser()
and only use multipart explicitly. To avoid multiparts vulnerability to 'temp file' bloat, use the defer
property and pipe()
the multipart upload stream to the intended destination.// Ensure object obj[prop] = {} | |
function _obj(obj, prop) { | |
if (obj[prop] == null) obj[prop] = {} | |
return obj[prop] | |
} | |
// Ensure number obj[prop] (+= val or = val) | |
function _diff(obj, prop, val) { | |
if (obj[prop] == null) obj[prop] = val | |
else obj[prop] += val | |
} |
# check out https://github.com/visionmedia/node-pwd | |
# Module dependencies. | |
crypto = require('crypto'); | |
# Bytesize. | |
len = 128; |
[alias] | |
recent = "!git for-each-ref --sort=-committerdate refs/heads/ --format='%(committerdate:short) %(refname:short)' | head -n 10" | |
co = checkout | |
cob = checkout -b | |
coo = !git fetch && git checkout | |
br = branch | |
brd = branch -d | |
brD = branch -D | |
merged = branch --merged | |
st = status |
/// <reference path="../tsd/tsd.d.ts" /> | |
import mongoose = require('mongoose'); | |
import passport = require('passport'); | |
interface IUser extends mongoose.Document { | |
provider: string; | |
id: string; | |
authorId: string; | |
displayName: string; |
// $primary: get-color('cyan', '500'); | |
@function get-color($color-hue, $color-shade: '500') { | |
$color: map-get(map-get($colors, $color-hue), $color-shade); | |
@if $color { | |
@return $color; | |
} @else { @error '=> ERROR'; } | |
} | |
$colors: ( |
/** | |
* Called if a parameter is missing and | |
* the default value is evaluated. | |
*/ | |
function mandatory() { | |
throw new Error('Missing parameter'); | |
} | |
function foo(mustBeProvided = mandatory()) { | |
return mustBeProvided; | |
} |