This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var customModel = new CustomModel(); | |
| var sampleView = new Backbone.View({ | |
| model: customModel | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $.fn.setAllToMaxHeight = function(){ | |
| return this.height( Math.max.apply(this, $.map( this , function(e){ return $(e).height() }) ) ); | |
| } | |
| // usage: $(‘div.unevenheights’).setAllToMaxHeight(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Check if localStorage is supported const isSupported: boolean | |
| * Check if localStorage has an Item function hasItem(key: string): boolean | |
| * Get the amount of space left in localStorage function getRemainingSpace(): number | |
| * Get the maximum amount of space in localStorage function getMaximumSpace(): number | |
| * Get the used space in localStorage function getUsedSpace(): number | |
| * Backup Assosiative Array interface Backup | |
| * Get a Backup of localStorage function getBackup(): Backup | |
| * Apply a Backup to localStorage function applyBackup(backup: Backup, fClear: boolean = true, fOverwriteExisting: boolean = true) | |
| * Dump all information of localStorage in the console function consoleInfo(fShowMaximumSize: boolean = false) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| commit 6e59bfbc45983b8680f023ac07a34cabe80985e5 | |
| Author: Adam Jakubek <[email protected]> | |
| Date: Mon Aug 13 01:24:39 2012 +0200 | |
| Prevent focus stealing when opening diverted URLs | |
| This patch allows to override current Chrome's behavior, where opening a | |
| link from an external application (e.g. mail client) causes Chrome's | |
| window to steal focus. | |
| It works by introducing a new command line switch |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #/bin/bash | |
| #-- Script to automate https://help.github.com/articles/why-is-git-always-asking-for-my-password | |
| REPO_URL=`git remote -v | grep -m1 '^origin' | sed -Ene's#.*(https://[^[:space:]]*).*#\1#p'` | |
| if [ -z "$REPO_URL" ]; then | |
| echo "-- ERROR: Could not identify Repo url." | |
| echo " It is possible this repo is already using SSH instead of HTTPS." | |
| exit | |
| fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /*! CSS.supports() Polyfill | |
| * https://gist.github.com/codler/03a0995195aa2859465f | |
| * Copyright (c) 2014 Han Lin Yap http://yap.nu; MIT license */ | |
| if (!('CSS' in window)) { | |
| window.CSS = {}; | |
| } | |
| if (!('supports' in window.CSS)) { | |
| window.CSS._cacheSupports = {}; | |
| window.CSS.supports = function(propertyName, value) { |
OlderNewer