Skip to content

Instantly share code, notes, and snippets.

View Wynout's full-sized avatar

Wynout van der Veer Wynout

  • The Netherlands
View GitHub Profile
// includes bindings for fetching/fetched
var PaginatedCollection = Backbone.Collection.extend({
initialize: function() {
_.bindAll(this, 'parse', 'url', 'pageInfo', 'nextPage', 'previousPage');
typeof(options) != 'undefined' || (options = {});
this.page = 1;
typeof(this.perPage) != 'undefined' || (this.perPage = 10);
},
fetch: function(options) {
@Wynout
Wynout / Sublime-Text.desktop
Created July 10, 2013 08:46
Pin Sublime Text to Ubuntu Unity. Save text in launcher "~/.local/share/applications/Sublime-Text.desktop". Replace "###" with path to ST. Drag and drop the launcher from ".local/share/applications" to the Launcher Bar on the left on your Screen. When pinned to bar: Right-click shows "Create Editor Window". Accepts file drop of files you want to…
[Desktop Entry]
Type=Application
Terminal=false
Name=Sublime Text 2
StartupNotify=true
GenericName=Text Editor
Comment=Edit text files
Exec=/###/###/SublimeText2/sublime_text %U
MimeType=text/plain;text/x-chdr;text/x-csrc;text/x-c++hdr;text/x-c++src;text/x-java;text/x-dsrc;text/x-pascal;text/x-perl;text/x-python;application/x-php;application/x-httpd-php3;application/x-httpd-php4;application/x-httpd-php5;application/xml;text/html;text/css;text/x-sql;text/x-diff;x-directory/normal;inode/directory;
Categories=GNOME;GTK;Utility;TextEditor;Application;Development;
@Wynout
Wynout / disable-text-selection.js
Created June 24, 2013 07:22
jQuery Plugin disableSelection
/**
* jQuery Plugin disableSelection
* Disable selection of text content within the set of matched elements.
*
* @return {Object} jQuery
* @chainable
*/
(function ($, window, document, undefined){
$.fn.disableSelection = function () {