Skip to content

Instantly share code, notes, and snippets.

View nickbenes's full-sized avatar

Nick Benes nickbenes

  • Leesburg, VA
View GitHub Profile
@nickbenes
nickbenes / images.js
Created June 7, 2015 15:16
Meteor collection for images using CollectionFS
var createThumb = function(fileObj, readStream, writeStream) {
// Transform the image into a 10x10px thumbnail
gm(readStream, fileObj.name()).resize('10', '10').stream().pipe(writeStream);
};
var createWeb = function(fileObj, readStream, writeStream) {
// Transform the image into a 10x10px thumbnail
gm(readStream, fileObj.name()).resize('320', '180').stream().pipe(writeStream);
};
var convertToPng = function(fileObj) {
return {
@abrkn
abrkn / sql-tdd.markdown
Last active May 22, 2020 14:59
Migrations and testing for PostgreSQL using node.js and Travis-CI

Migrations and testing for PostgreSQL using node.js and Travis-CI

We're looking to add a column to the table user called admin (boolean) in an existing database.

Project layout

migrations
@mattnorris
mattnorris / github-pages.md
Created April 4, 2013 01:56
How to create a GitHub page using Jekyll and Bootstrap

Creating Whispernote's GitHub Project Page

Jekyll, GitHub's static site generator, and Bootstrap were used to create Whispernote's GitHub Project Page. This document shows how.

Project Goals

I wanted a stylish "brand" page for my project, and I wanted to reuse the README file I had created without a lot of copy/pasting. GitHub's Jekyll allowed me to essentially embed the file as a partial. What I got was really an enhanced README file (thanks to some jQuery and Bootstrap), which is exactly what I wanted.

gh-pages

@mbostock
mbostock / .block
Last active November 14, 2023 03:46
Google Maps + D3
license: gpl-3.0