Skip to content

Instantly share code, notes, and snippets.

View boostup's full-sized avatar
💭
👍

Fred B. boostup

💭
👍
View GitHub Profile
@boostup
boostup / server.js
Last active December 13, 2017 09:13
node.js: how to pipe a output from child process into a webpage
/**
* Credits to:
* https://aaronaddleman.com/articles/how-to-pipe-a-output-from-child-process-into-a-webpage/
*/
// how to pipe a output from child process into a webpage
// start with importing an http server
var http = require('http');
// import the spawn function
var spawn = require('child_process').spawn;
@boostup
boostup / tag-old-commit.sh
Created December 11, 2017 15:42
GIT: Tag a past commit
# Set the HEAD to the old commit that we want to tag
git checkout 9fceb02
# temporarily set the date to the date of the HEAD commit, and add the tag
GIT_COMMITTER_DATE="$(git show --format=%aD | head -1)" \
git tag -a v1.2 -m"v1.2"
# set HEAD back to whatever you want it to be
git checkout master
@boostup
boostup / settings.json
Created December 11, 2017 13:55
VSCode: Hiding files from the project files explorer. To be placed inside [root_directory]/.vscode
{
"files.exclude": {
"**/.git": true,
"**/.svn": true,
"**/.hg": true,
"**/CVS": true,
"**/.DS_Store": true,
"**/node_modules": true
}
}
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Launch App",
"type": "node",
"request": "launch",