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
@gfranko
gfranko / index.js
Created Feb 10, 2014
requirebin sketch
View index.js
// Checks to see if any CSS rule using inline-block also includes the IE6 and IE7 inline-block hack
// If the IE hacks are not there, they are added
var css = require('css'),
_ = require('lodash'),
exampleCSS = '.example-selector { display: inline-block; }',
ast = css.parse(exampleCSS);
_.each(ast.stylesheet.rules, function(rule) {
fixIEBugs(rule);
});
@gfranko
gfranko / example.js
Created Feb 7, 2014
Make Entire Tocify TOC Visible
View example.js
$('#toc').tocify({
'showAndHideOnScroll': false
});
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 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
@gfranko
gfranko / example.js
Last active Dec 19, 2015
Ember.js Views - It would be amazing if Ember Views would allow you to pass an events object of key/value event delegation mappings (similar to Backbone Views). Right now you have to use event.target conditional checking, create more granular Views, or use the action Handlebars helper to trigger custom events.
View example.js
App = Ember.Application.create();
App.ExampleView = Ember.View.extend({
// This removes the whole event.target ugly checking
events: {
'.example click': function() {
console.log('an example image was clicked!');
}
}
});
@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'));
@gfranko
gfranko / jquery.ui.widget.js
Created Feb 10, 2013
AMD Compatible jQueryUI Widget Factory
View jquery.ui.widget.js
/*! jQuery UI - v1.10.0 - 2013-02-10
* http://jqueryui.com
* Includes: jquery.ui.widget.js
* Copyright (c) 2013 jQuery Foundation and other contributors Licensed MIT */
;(function (widgetFactory) {
if (typeof define === "function" && define.amd) {
// AMD. Register as an anonymous module.
define("jquery.ui.widget", ["jquery"], function() {
View Command Line Error Log
$ jitsu deploy
info: Welcome to Nodejitsu gregfranko
info: jitsu v0.10.4, node v0.8.9
info: It worked if it ends with Nodejitsu ok
info: Executing command deploy
info: Analyzing application dependencies in server.js
warn: Local package version appears to be old
warn: The package.json version will be incremented automatically
warn: About to write /Users/gregfranko/OS/FantasyMMA/package.json
data:
@gfranko
gfranko / app.build.js
Last active Oct 12, 2015
Backbone-Require-Boilerplate (BRB) Mobile and Desktop Build Configuration with almond.js
View app.build.js
// Node.js - Require.js Build Script
// To run the build type the following: node app.build.js
// Loads the Require.js Optimizer
var requirejs = require('../public/js/libs/r.js');
// Sets up the basic configuration
var baseConfig = {
You can’t perform that action at this time.