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 data = [ | |
| {month: 1, reminder: 0}, | |
| {month: 2, reminder: 2}, | |
| {month: 3, reminder: 1}, | |
| {month: 4, reminder: 2}, | |
| {month: 5, reminder: 1}, | |
| {month: 6, reminder: 2}, | |
| {month: 7, reminder: 1}, | |
| {month: 8, reminder: 0}, | |
| {month: 9, reminder: 1}, |
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 facebook = { | |
| "data": [ | |
| { | |
| "country_code": "US", | |
| "name": "United States", | |
| "supports_region": "true", | |
| "supports_city": "true" | |
| }, | |
| { | |
| "country_code": "CA", |
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
| # disable local snapshots feature of time machine | |
| sudo tmutil disablelocal | |
| # undo | |
| #sudo tmutil enablelocal | |
| # delete all mobile backups | |
| # repeat after every new backup drive selection | |
| sudo rm -r /.MobileBackups |
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
| # | |
| # Original version by Grant Parnell is offline (http://digitaldj.net/2011/07/21/trim-enabler-for-lion/) | |
| # Update July 2014: no longer offline, see https://digitaldj.net/blog/2011/11/17/trim-enabler-for-os-x-lion-mountain-lion-mavericks/ | |
| # | |
| # Looks for "Apple" string in HD kext, changes it to a wildcard match for anything | |
| # | |
| # Alternative to http://www.groths.org/trim-enabler-3-0-released/ | |
| # Method behind this madness described: http://forums.macrumors.com/showthread.php?t=1409151&page=4 | |
| # See discussion in comments here: https://www.macupdate.com/app/mac/39654/lion-tweaks | |
| # And here: http://forums.macrumors.com/showthread.php?t=1410459 |
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> | |
| <script src="http://code.jquery.com/jquery-git2.js"></script> | |
| <script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.3.0-beta.1/angular.min.js"></script> | |
| <meta charset="utf-8"> | |
| <title>JS Bin</title> | |
| </head> | |
| <body> |
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 lengthOf(object) { | |
| var element_count = 0; | |
| for (e in object) { element_count++; } | |
| return element_count; | |
| } | |
| function _jqCacheSize(){return lengthOf($.cache);} |
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> | |
| <meta charset="utf-8"> | |
| <title>JS Bin</title> | |
| </head> | |
| <body> | |
| <div id="container"> | |
| <button id="b1">Кнопка</button> | |
| <button id="b2">Кнопка</button> |
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 add_event = function (object, event, callback) { | |
| object = get_element(object); | |
| if (!object) { | |
| return; | |
| } | |
| if (object && object.addEventListener) { | |
| object.addEventListener(event, callback, 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
| var add_class = function(element, classname) { | |
| var class_name = element.className; | |
| //test for existance | |
| if( class_name.indexOf( classname ) !== -1 ) { | |
| return; | |
| } | |
| //add a space if the element already has class | |
| if( class_name !== '' ) { | |
| classname = ' '+classname; | |
| } |
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 () { | |
| var left_links = document.getElementById("menu").getElementsByTagName('a'); | |
| var current_url = document.location; | |
| for (var i = 0; i < left_links.length; i++) { | |
| if (current_url.pathname == left_links[i].pathname && current_url.host == left_links[i].host ) { | |
| left_links[i].className += ' active'; | |
| } | |
| } | |
| })(); |