Skip to content

Instantly share code, notes, and snippets.

View ibare's full-sized avatar
😃
I'm happy!!

Kim Mintae ibare

😃
I'm happy!!
  • WoowaBros
  • seoul, korea
View GitHub Profile

MongoDB Cheat Sheet

Show All Databases

show dbs

Show Current Database

@fratuz610
fratuz610 / decrypt.js
Created November 20, 2015 04:27
Encrypt from Java and decrypt on Node.js - aes 256 ecb
// we determine the key buffer
var stringKey = "example";
var cipherText = ".........";
// we compute the sha256 of the key
var hash = crypto.createHash("sha256");
hash.update(stringKey, "utf8");
var sha256key = hash.digest();
var keyBuffer = new Buffer(sha256key);
@ericdouglas
ericdouglas / embed-plunker.html
Created December 6, 2014 13:31
Embed Plunker
<iframe style="width: 100%; height: 600px" src="http://embed.plnkr.co/GvOO1itX8MG7zJLywSN8" frameborder="0" allowfullscren="allowfullscren"></iframe>
@clarle
clarle / app.js
Created July 26, 2012 07:35
Short tutorial on how to use Express and node-mysql
// Module dependencies
var express = require('express'),
mysql = require('mysql');
// Application initialization
var connection = mysql.createConnection({
host : 'localhost',
user : 'root',
@charlesdaniel
charlesdaniel / basic_auth_nodejs_test.js
Created January 27, 2012 02:53
Example of HTTP Basic Auth in NodeJS
var http = require('http');
var server = http.createServer(function(req, res) {
// console.log(req); // debug dump the request
// If they pass in a basic auth credential it'll be in a header called "Authorization" (note NodeJS lowercases the names of headers in its request object)
var auth = req.headers['authorization']; // auth is in base64(username:password) so we need to decode the base64
console.log("Authorization Header is: ", auth);