As easy as 1, 2, 3!
Updated:
- Aug, 08, 2022 update
config
docs for npm 8+ - Jul 27, 2021 add private scopes
- Jul 22, 2021 add dist tags
- Jun 20, 2021 update for
--access=public
- Sep 07, 2020 update docs for
npm version
var util = require('util') | |
function hook_stdout(callback) { | |
var old_write = process.stdout.write | |
process.stdout.write = (function(write) { | |
return function(string, encoding, fd) { | |
write.apply(process.stdout, arguments) | |
callback(string, encoding, fd) | |
} |
Various Cheats found on the Web | |
mongo //Start Mongo | |
show dbs //Show databases | |
use mydb //User database named "mydb" | |
db //Show selected database | |
help //Get help | |
show collection //Show collections from a database | |
Finds - db.collection |
boilerplate | |
HTML Boilerplate - simple HTML includes using jquery | |
As a long time JSP developer, transitioning into the fabulous world of Pure HTML and JavaScript front-end development. There is a need to divide and conquer your web interface into manageable and reusable parts. This is a simple demo using JQuery that divides a front end website into three reusable parts. | |
Header | |
Main Container | |
Navigation | |
Footer | |
There is not much to it. JQuery does all the magic. |
People
![]() :bowtie: |
😄 :smile: |
😆 :laughing: |
---|---|---|
😊 :blush: |
😃 :smiley: |
:relaxed: |
😏 :smirk: |
😍 :heart_eyes: |
😘 :kissing_heart: |
😚 :kissing_closed_eyes: |
😳 :flushed: |
😌 :relieved: |
😆 :satisfied: |
😁 :grin: |
😉 :wink: |
😜 :stuck_out_tongue_winking_eye: |
😝 :stuck_out_tongue_closed_eyes: |
😀 :grinning: |
😗 :kissing: |
😙 :kissing_smiling_eyes: |
😛 :stuck_out_tongue: |
// SocketIO cheat sheet | |
// SocketIO is a library that makes websockets communications easier. | |
// Page: http://socket.io/ | |
// ref: http://stackoverflow.com/a/10099325 | |
// send to current request socket client | |
socket.emit('message', "this is a test"); | |
// sending to all clients, include sender | |
io.sockets.emit('message', "this is a test"); |
#!/bin/bash | |
# | |
# Crude script to backup an organisations repositories and its members forks. | |
# | |
# Name of organisation | |
ORG="change" | |
# Needed to talk to API |
#firefox example | |
- Install XQuartz | |
open -a XQuartz | |
ip=$(ifconfig en0 | grep inet | awk '$1=="inet" {print $2}') | |
xhost + $ip |
/* | |
* Primary file for API | |
* | |
*/ | |
// Dependencies | |
var http = require('http'); | |
var url = require('url'); | |
var StringDecoder = require('string_decoder').StringDecoder; |