Skip to content

Instantly share code, notes, and snippets.

View boostup's full-sized avatar
💭
👍

Fred B. boostup

💭
👍
View GitHub Profile
@boostup
boostup / reset.css
Created September 8, 2020 18:11 — forked from DavidWells/reset.css
CSS reset. Follow me on the twitters for more tips: https://twitter.com/davidwells
/* http://meyerweb.com/eric/tools/css/reset/
v2.0-modified | 20110126
License: none (public domain)
*/
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
@boostup
boostup / readJsonFileAsync.js
Created March 30, 2018 08:13 — forked from wuchengwei/readJsonFileAsync.js
NodeJS - Read in a json file asynchronously
/*
* @param {String} filepath
* @param {function} callback function(err, data){}
*/
function readJsonFileAsync(filepath, callback) {
var fs = require('fs');
fs.readFile(filepath, 'utf-8', function(err, data) {
if (err) { callback(err, null); }
else {
result = JSON.parse(data);
@boostup
boostup / server.js
Last active July 24, 2020 10:43 — forked from RichFromGalvanize/gist:5873044
node.js: an image piping example using express and request
var request = require('request');
var express = require('express');
var app = express();
app.get('/goofy', function(req, res) {
request('http://images1.wikia.nocookie.net/__cb20120715102950/disney/images/a/a5/Disneygoofy2012.jpeg').pipe(res);
});
app.get('/loop', function(req, res) {
res.render('mypage');
{
// 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",