Skip to content

Instantly share code, notes, and snippets.

View cosmomathieu's full-sized avatar
🎯
Focusing

Cosmo Mathieu cosmomathieu

🎯
Focusing
View GitHub Profile
@bergie
bergie / README.md
Created May 30, 2012 12:47
Backbone.js Collection View example

This is an example of using a Collection view with Backbone.

@tlinkner
tlinkner / Output iOS Icons.jsx
Last active March 21, 2019 18:06
Photoshop script to output iOS icons, now with iOS 8 sizes
// Output iOS Icons.jsx
// 2014 Todd Linkner
// License: none (public domain)
// v1.2
//
// This script is for Photoshop CS6. It outputs iOS icons of the following
// sizes from a source 1024px x 1024px PSD
//
// [name]-29.png
// [name][email protected]
@tlinkner
tlinkner / Output Android Icons.jsx
Last active February 19, 2021 14:15
Photoshop script to output Android icons
// Output Android Icons.jsx
// 2012 Todd Linkner
// License: none (public domain)
// v1.0
//
// This script is for Photoshop CS6. It outputs Android icons of the
// following sizes from a source PSD at least 512px x 512px
//
// store:
// Icon.png (512px x 512px)
@mike-price
mike-price / jquery.plugin-template.js
Created November 20, 2012 16:46 — forked from Air-Craft/jquery.plugin-template.js
jQuery Plugin Design Pattern/Template Improved!
// if (!window.L) { window.L = function () { console.log(arguments);} } // optional EZ quick logging for debugging
/**
* A modified (improved?) version of the jQuery plugin design pattern
* See http://docs.jquery.com/Plugins/Authoring (near the bottom) for details.
*
* ADVANTAGES OF EITHER FRAMEWORK:
* - Encapsulates additional plugin action methods without polluting the jQuery.fn namespace
* - Ensures ability to use '$' even in compat modes
*
@devyfriend
devyfriend / MY_Router.php
Created January 11, 2013 13:55
Codeigniter DB Router for Modular
<?php (defined('BASEPATH')) OR exit('No direct script access allowed');
/* load the MX_Router class */
require APPPATH."third_party/MX/Router.php";
class MY_Router extends MX_Router {
function _set_routing()
{
// Are query strings enabled in the config file? Normally CI doesn't utilize query strings
@michaeljohnson
michaeljohnson / bootstrap-carousel.slide.ext.js
Last active January 17, 2022 05:09
Extend Carousel from Twitter Bootstrap (bootstrap-carousel.js) with js fallback for browsers without css3 transition support. See @barryvdh https://github.com/Barryvdh/bootstrap/commit/8b294f0c0184eb7111ef6da6046d4d1f33ea7ba3
@najlepsiwebdesigner
najlepsiwebdesigner / jquery.plugin.blank.template.js
Created February 19, 2013 10:36
great blank jquery plugin template!
/*!
* jQuery lightweight plugin boilerplate
* Original author: @ajpiano
* Further changes, comments: @addyosmani
* Licensed under the MIT license
*/
// the semi-colon before the function invocation is a safety
// net against concatenated scripts and/or other plugins
@jonlabelle
jonlabelle / string-utils.js
Last active June 27, 2025 14:26
Useful collection of JavaScript string utilities.
// String utils
//
// resources:
// -- mout, https://github.com/mout/mout/tree/master/src/string
/**
* "Safer" String.toLowerCase()
*/
function lowerCase(str) {
return str.toLowerCase();
@jpdevries
jpdevries / gist:5505905
Created May 2, 2013 22:16
Export PhotoShop Layers as .png (save as a .jsx file open in Adobe ExtendScript Toolkit)
// layerName.jsx
// Copyright 2006-2008
// Written by Jeffrey Tranberry
// Photoshop for Geeks Version 2.0
/*
Description:
Using an alert(); to display current Layer's name.
Set the name of the current layer to a string "Timmy"
*/
@psyked
psyked / gist:5847065
Last active November 13, 2018 15:35
JavaScript Observer Pattern - Module Pattern implementation
var Observable = (function()
{
"use strict";
/**
* @constructor
* @returns {{attach: Function, detach: Function, notify: Function}}
*/
var constructor = function()
{