Skip to content

Instantly share code, notes, and snippets.

View kevb10's full-sized avatar
🏠
Working from home

Kevin Manase kevb10

🏠
Working from home
View GitHub Profile
@betweenbrain
betweenbrain / read-files.js
Created December 5, 2016 22:35
Node.js read multiple files, write into one
var fs = require('fs');
var Promise = require('promise');
var promises = [];
var readline = require('readline');
var readFile = function (file) {
return new Promise(function (resolve, reject) {
var lines = [];
var rl = readline.createInterface({
input: fs.createReadStream('./logs/' + file)
@ruddfawcett
ruddfawcett / Gruntfile.js
Created November 9, 2016 01:36 — forked from inkbase/Gruntfile.js
A Gruntfile to set up a Sass/Pug project
module.exports = function(grunt) {
// configure the tasks
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
// copy from the source directory to build
copy: {
build: {
cwd: 'source',
src: [ '**', '!**/*.pug', '!sass', '!sass/*', '!**/*.scss', '!partials', '!partials/*' ],
dest: 'build',
@irazasyed
irazasyed / homebrew-permissions-issue.md
Last active January 25, 2025 15:00
Homebrew: Permissions Denied Issue Fix (OS X / macOS)

Homebrew Permissions Denied Issues Solution

sudo chown -R $(whoami) $(brew --prefix)/*

@cdesch
cdesch / gist:2033820
Created March 14, 2012 03:31
Simple NSDate Components - Easy to break into pieces
NSDate *currDate = [NSDate date]; //Current Date
NSDateFormatter *df = [[NSDateFormatter alloc] init];
//Day
[df setDateFormat:@"dd"];
NSString* myDayString = [NSString stringWithFormat:@"%@", [df stringFromDate:currDate]];
//Month
[df setDateFormat:@"MM"]; //MM will give you numeric "03", MMM will give you "Mar"
NSString* myMonthString = [NSString stringWithFormat:@"%@", [df stringFromDate:currDate]];