Skip to content

Instantly share code, notes, and snippets.

View tinacious's full-sized avatar
👩‍💻

Tina Holly tinacious

👩‍💻
View GitHub Profile
@tinacious
tinacious / app.js
Created July 17, 2014 13:15
Using Express to serve a static site on Node.js for easy deploy to Heroku
/**
* This is your Node app's main file
* Don't forget to run `heroku ps:scale web=1` in the Terminal
*/
var express = require('express');
var http = require('http');
var path = require('path');
var app = express();
app.set('port', process.env.PORT || 3000);
@tinacious
tinacious / images.sh
Last active August 29, 2015 13:55
This bash script batch resizes and renames images. Run this script in a directory with images to process them. It will ask you: current file extension, and desired filename and size.
# Image processing function
# Usage: In the Terminal, run: bash images.sh
# Get user input and resize images
function process () {
# rename
a=1
for i in *.${ext}
do