[ Launch: radial ] c11d3c3df4f53880061d by tborychowski
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 python | |
| def gmail_checker(username,password): | |
| import imaplib,re | |
| i=imaplib.IMAP4_SSL('imap.gmail.com') | |
| try: | |
| i.login(username,password) | |
| x,y=i.status('INBOX','(MESSAGES UNSEEN)') | |
| messages=int(re.search('MESSAGES\s+(\d+)',y[0]).group(1)) | |
| unseen=int(re.search('UNSEEN\s+(\d+)',y[0]).group(1)) | |
| return (messages,unseen) |
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
| $.ajax({ url: '//www.google.com/jsapi', dataType: 'script' }).done(function () { | |
| var addr = google.loader.ClientLocation.address; | |
| console.log(addr); | |
| }); | |
| $.getJSON('//freegeoip.net/json/', function(location) { | |
| console.log(location); | |
| }); |
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
| fail | |
| f (![]+[])[+[]] | |
| a (![]+[])[+!+[]] | |
| i ([![]]+[][[]])[+!+[]+[+[]]] | |
| l (![]+[])[!+[]+!+[]] | |
| t (!![]+[])[+[]] | |
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
| _getUrlVars = function () { | |
| var vars = {}, | |
| parts = window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi, function (m, key, value) { | |
| vars[key] = value; | |
| }); | |
| return vars; | |
| } |
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
| String.prototype.fuzzy = function (s) { | |
| var hay = this.toLowerCase(), i = 0, n = -1, l; | |
| s = s.toLowerCase(); | |
| for (; l = s[i++] ;) if (!~(n = hay.indexOf(l, n + 1))) return false; | |
| return true; | |
| }; | |
| ('a haystack with a needle').fuzzy('hay sucks'); // false | |
| ('a haystack with a needle').fuzzy('sack hand'); // true |
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
| console.log('%cERROR: %c siema %c tom', | |
| 'font: bold 12px arial; color:red; line-height:2.6em;', | |
| 'font: 12px arial; color:green;', | |
| 'font: 12px arial; color:blue;' | |
| ); |
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
| /* DATE FUNCTIONS */ | |
| Date.months = [ | |
| { shortName: 'jan', days: 31, name: 'January' }, | |
| { shortName: 'feb', days: 28, name: 'February' }, | |
| { shortName: 'mar', days: 31, name: 'March' }, | |
| { shortName: 'apr', days: 30, name: 'April' }, | |
| { shortName: 'may', days: 31, name: 'May' }, | |
| { shortName: 'jun', days: 30, name: 'June' }, | |
| { shortName: 'jul', days: 31, name: 'July' }, | |
| { shortName: 'aug', days: 31, name: 'August' }, |
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
| $({ a:0 }).animate({ a:.3 },{ | |
| duration: 1000, | |
| step: function(){ | |
| // do something | |
| }, | |
| complete: function(){ | |
| } | |
| }); |
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
| /* From Modernizr */ | |
| function whichTransitionEvent() { | |
| var el = document.createElement('fakeelement'), t, | |
| transitions = { | |
| 'transition': 'transitionend', | |
| 'OTransition': 'oTransitionEnd', | |
| 'MozTransition': 'transitionend', | |
| 'WebkitTransition': 'webkitTransitionEnd', | |
| 'MsTransition': 'msTransitionEnd' | |
| }; |