Skip to content

Instantly share code, notes, and snippets.

@joshuapowell
joshuapowell / reset.less
Last active December 12, 2021 13:35
LESS: Global LESS CSS reset that gives elements default formatting.
/**
* Global Reset of all HTML Elements
*
* Resetting all of our HTML Elements ensures a smoother
* visual transition between browsers. If you don't believe me,
* try temporarily commenting out this block of code, then go
* and look at Mozilla versus Safari, both good browsers with
* a good implementation of CSS. The thing is, all browser CSS
* defaults are different and at the end of the day if visual
* consistency is what we're shooting for, then we need to
@stewartduffy
stewartduffy / gist:481f21ea4906e611d934
Last active June 24, 2024 07:37
Regex to remove file extension from JS string.
var filenameFull = "tm_icons.png";
//Regex to remove
var filenameText = filenameFull.replace(/\.[^/.]+$/, "");
@DingGGu
DingGGu / multer-multiple-resize-upload-s3.js
Created July 8, 2016 00:56
Multer multiple upload S3 with Resizing Images
var config = require('../config');
var async = require('async');
var gm = require('gm');
var mime = require('mime');
var stream = require('stream');
var aws = require('aws-sdk');
var s3 = new aws.S3(config.aws);
@NigelEarle
NigelEarle / Knex-Setup.md
Last active July 8, 2024 11:52
Setup Knex with Node.js

Knex Setup Guide

Create your project directory

Create and initialize your a directory for your Express application.

$ mkdir node-knex-demo
$ cd node-knex-demo
$ npm init
@laurenfazah
laurenfazah / express_postgress_knex.md
Last active November 26, 2022 13:19
Cheat Sheet: Setting up Express with Postgres via Knex

Express & Postgres via Knex

Note: <example> is meant to denote text replaced by you (including brackets).

Setup

// global dependencies
npm install -g knex
@gregori
gregori / first-fit.c
Created May 15, 2018 19:48
Algoritmo first-fit em C
#include <stdio.h>
#define MAX 20
/**
* Algorítmo first-fit didático
* escrito em C ANSI
*/
/* tipo para o obloco de memória */