Skip to content

Instantly share code, notes, and snippets.

Greg Franko gfranko

Block or report user

Report or block gfranko

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:2c9a6ac25c57d7746277
echo 'kern.maxfiles=20480' | sudo tee -a /etc/sysctl.conf && echo -e 'limit maxfiles 8192 20480\nlimit maxproc 1000 2000' | sudo tee -a /etc/launchd.conf && echo 'ulimit -n 4096' | sudo tee -a /etc/profile
@gfranko
gfranko / app.js
Created Apr 4, 2013
Method to check if an element is visible. Detects if another element is absolutely positioned on top of it. Should work in IE9+, Firefox 3+, Chrome, and Safari.
View app.js
isVisible(document.getElementById('at-follow'));
View 2014 Open-Source To-Do List
1. Release AMDClean.js v0.4.0:
a. Remove all `require` methods that contain empty function declarations
b. Implement Gulp.js as the build system
2. Create Gulp Plugins:
a. Jasmine-Node
3. Release DownloadBuilder.js v0.8.0:
a. Support Require.js build configurations with the r.js web builder
b. Support built-in minification with the uglify.js web minifier
View Front-End Blog Post Ideas
1. Creating Maintainable JavaScript Libraries with AMDClean
2. Backbone.js Custom Builds
3. Grunt or Gulp?
4. Web Components & Polymer
5. The Future of jQuery Plugins - A Web Components Story
View intro.js
;(function (id, name, context, definition) {
// --------------------------------------------------------------------------
// Dependencies
//
// This is an attempt to make this library compatible with multiple module
// formats. Other UMD implementations do not take into account dependencies:
// Example: https://github.com/ForbesLindesay/umd/blob/master/template.js
//
// **NOTE: Named AMD modules are more suitable for libraries as it provides
@mattheworiordan
mattheworiordan / rate_limit.js
Created Jul 15, 2011
Rate limiting function calls with JavaScript and Underscore.js
View rate_limit.js
/* Extend the Underscore object with the following methods */
// Rate limit ensures a function is never called more than every [rate]ms
// Unlike underscore's _.throttle function, function calls are queued so that
// requests are never lost and simply deferred until some other time
//
// Parameters
// * func - function to rate limit
// * rate - minimum time to wait between function calls
// * async - if async is true, we won't wait (rate) for the function to complete before queueing the next request
@focusaurus
focusaurus / ep_app.js
Created Jun 14, 2013
Example of how a main express app can mount sub-applications on a mount point with app.use('/mount-point', subapp); If you GET /, you'll see the main_app's '/' response. If you GET /ep_app, you'll see the ep_app's '/' response.
View ep_app.js
var express = require("express");
var app = express();
app.get('/', function (req, res) {
res.send("This is the '/' route in ep_app");
});
module.exports = app;
View launch_sublime_from_terminal.markdown

Launch Sublime Text 2 from the Mac OS X Terminal

Sublime Text 2 ships with a CLI called subl (why not "sublime", go figure). This utility is hidden in the following folder (assuming you installed Sublime in /Applications like normal folk. If this following line opens Sublime Text for you, then bingo, you're ready.

open /Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin/subl

You can find more (official) details about subl here: http://www.sublimetext.com/docs/2/osx_command_line.html

Installation

@nuxlli
nuxlli / sublime_text_2_useful_shortcuts.md
Created Sep 9, 2011 — forked from lucasfais/gist:1207002
Sublime Text 2 - Useful Shortcuts
View sublime_text_2_useful_shortcuts.md

Sublime Text 2 - Useful Shortcuts

Tested in Mac OS X: super == command

Open/Goto


  • super+t: go to file
  • super+ctrl+p: go to project
  • super+r: go to methods
You can’t perform that action at this time.