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
| #dropbox { | |
| position: relative; | |
| } | |
| #dropbox > input { | |
| position: absolute; | |
| top: 0px; | |
| right: 0px; | |
| bottom: 0px; | |
| left: 0px; |
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
| <!doctype html> | |
| <html> | |
| <head> | |
| <!-- Priority tags. These must come first. --> | |
| <meta charset="utf-8"> | |
| <meta http-equiv="x-ua-compatible" content="ie=edge; chrome=1"> <!-- Render Chrome if available or using latest version of Internet Explorer (Recommended). --> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no"> | |
| <!-- Document Title --> | |
| <title>Page Title</title> | |
| <!-- Allows control over where resources are loaded from. Place as early in the document as possible, only applies to content below this tag. --> |
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 countries_data = {"type":"FeatureCollection","features":[ | |
| {"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[74.92,37.24],[74.57,37.03],[72.56,36.82],[71.24,36.13],[71.65,35.42],[71.08,34.06],[69.91,34.04],[70.33,33.33],[69.51,33.03],[69.33,31.94],[66.72,31.21],[66.26,29.85],[62.48,29.41],[60.87,29.86],[61.85,31.02],[60.84,31.5],[60.58,33.07],[60.94,33.52],[60.51,34.14],[61.28,35.61],[62.72,35.25],[63.12,35.86],[64.5,36.28],[64.8,37.12],[66.54,37.37],[67.78,37.19],[69.32,37.12],[70.97,38.47],[71.59,37.9],[71.68,36.68],[73.31,37.46],[74.92,37.24]]]]},"properties":{"name":"Afghanistan"},"id":"AF"}, | |
| {"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[19.44,41.02],[19.37,41.85],[19.65,42.62],[20.07,42.56],[20.59,41.88],[20.82,40.91],[20.98,40.86],[20.01,39.69],[19.29,40.42],[19.44,41.02]]]]},"properties":{"name":"Albania"},"id":"AL"}, | |
| {"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[2.96,36.8],[8.62,36.94],[8.18,36.52],[8.25,34.64],[7.49,33.89],[9.06,3 |
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 parser = document.createElement('a'); | |
| parser.href = "http://example.com:3000/pathname/?search=test#hash"; | |
| parser.protocol; // => "http:" | |
| parser.hostname; // => "example.com" | |
| parser.port; // => "3000" | |
| parser.pathname; // => "/pathname/" | |
| parser.search; // => "?search=test" | |
| parser.hash; // => "#hash" | |
| parser.host; // => "example.com:3000" |
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
| #!/usr/bin/env sh | |
| ## | |
| # This is script with usefull tips taken from: | |
| # https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
| # | |
| # install it: | |
| # curl -sL https://raw.github.com/gist/2108403/hack.sh | sh | |
| # |
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
| Dear soon-to-be-former user, | |
| We've got some fantastic news! Well, it's great news for us anyway. You, on | |
| the other hand, are fucked. | |
| We've just been acquired by: | |
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
| function nestCollection(model, attributeName, nestedCollection) { | |
| //setup nested references | |
| for (var i = 0; i < nestedCollection.length; i++) { | |
| model.attributes[attributeName][i] = nestedCollection.at(i).attributes; | |
| } | |
| //create empty arrays if none | |
| nestedCollection.bind('add', function (initiative) { | |
| if (!model.get(attributeName)) { | |
| model.attributes[attributeName] = []; |
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 distance_of_time_in_words, time_ago_in_words; | |
| time_ago_in_words = function(from_time, include_seconds) { | |
| if (include_seconds != null) { | |
| include_seconds; | |
| } else { | |
| include_seconds = false; | |
| }; | |
| return App.distance_of_time_in_words(from_time, Date.now(), include_seconds); | |
| }; | |
| distance_of_time_in_words = function(from_time, to_time, include_seconds) { |
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
| /** | |
| * Asesses all of the events handlers bound on an View and makes touch event equivalents. | |
| * | |
| * Dependencies: Backbone, jQuery, Ben Alman's Outside Events jQuery plugin updated to support "touchstart" | |
| * | |
| * @param {Backbone.View} view | |
| */ | |
| function touchify (view) { | |
| _.each(view.events, function (value, key) { | |
| _.each({'mouseleave': 'touchstartoutside', 'mouseenter': 'touchstart'}, function (eventValue, eventKey) { |
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
| <select name="DropDownTimezone" id="DropDownTimezone"> | |
| <option value="-12.0">(GMT -12:00) Eniwetok, Kwajalein</option> | |
| <option value="-11.0">(GMT -11:00) Midway Island, Samoa</option> | |
| <option value="-10.0">(GMT -10:00) Hawaii</option> | |
| <option value="-9.0">(GMT -9:00) Alaska</option> | |
| <option value="-8.0">(GMT -8:00) Pacific Time (US & Canada)</option> | |
| <option value="-7.0">(GMT -7:00) Mountain Time (US & Canada)</option> | |
| <option value="-6.0">(GMT -6:00) Central Time (US & Canada), Mexico City</option> | |
| <option value="-5.0">(GMT -5:00) Eastern Time (US & Canada), Bogota, Lima</option> | |
| <option value="-4.0">(GMT -4:00) Atlantic Time (Canada), Caracas, La Paz</option> |