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
| https://developer.mozilla.org/en-US/docs/DOM/window.btoa | |
| https://developer.mozilla.org/en-US/docs/DOM/window.atob | |
| <html> | |
| <head> | |
| <title>base64 Encoding/Decoding</title> | |
| </head> | |
| <script type="text/javascript"> | |
| <!-- |
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 s4() { | |
| return Math.floor((1 + Math.random()) * 0x10000) | |
| .toString(16) | |
| .substring(1); | |
| }; | |
| function guid() { | |
| return s4() + s4() + '-' + s4() + '-' + s4() + '-' + | |
| s4() + '-' + s4() + s4() + s4(); | |
| } |
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
| $(document).on('keydown',function(e){ | |
| document.passTime = setTimeout(function(){passMatch=""},2000); | |
| var passWord = 'IDDQD'; | |
| var keys = { | |
| 73:"I", | |
| 68:"D", | |
| 81:"Q" | |
| }; | |
| if(e.keyCode===73||e.keyCode===68||e.keyCode===81||e.keyCode===40){ | |
| passMatch+= keys[e.keyCode]; |
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 somewhere = document.getElementById('here'), | |
| fragment = document.createDocumentFragment(), | |
| i, li; | |
| for(i = 0; i < 1000; i++){ | |
| li = document.createElement('li'); | |
| li.innerText = i; | |
| fragment.appendChild(li); | |
| } |
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
| .drop-shadow(@x-axis: 0, @y-axis: 1px, @blur: 2px, @alpha: 0.1) { | |
| -webkit-box-shadow: @x-axis @y-axis @blur rgba(0, 0, 0, @alpha); | |
| -moz-box-shadow: @x-axis @y-axis @blur rgba(0, 0, 0, @alpha); | |
| box-shadow: @x-axis @y-axis @blur rgba(0, 0, 0, @alpha); | |
| } |
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
| .gradient(@color,@color2){ | |
| background: @color; /* Old browsers */ | |
| background: -moz-linear-gradient(top, @color 0%, @color2 100%); /* FF3.6+ */ | |
| background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,@color), color-stop(100%,@color2)); /* Chrome,Safari4+ */ | |
| background: -webkit-linear-gradient(top, @color 0%,@color2 100%); /* Chrome10+,Safari5.1+ */ | |
| background: -o-linear-gradient(top, @color 0%,@color2 100%); /* Opera 11.10+ */ | |
| background: -ms-linear-gradient(top, @color 0%,@color2 100%); /* IE10+ */ | |
| background: linear-gradient(to bottom, @color 0%,@color2 100%); /* W3C */ | |
| filter: progid:DXImageTransform.Microsoft.gradient( startColorstr=@color, endColorstr=@color2,GradientType=0 ); /* IE6-9 */ | |
| } |
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 colors = [ | |
| "#7451ce", | |
| "#563d6e", | |
| "#ad4c4a", | |
| "#4878a2", | |
| "#ccd05a", | |
| "#52b54c" | |
| ]; |
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
| // MIXINS | |
| vendor(prop, args) | |
| -webkit-{prop} args | |
| -moz-{prop} args | |
| -o-{prop} args | |
| {prop} args | |
| animation() | |
| vendor('animation', arguments) |
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
| javascript:(function(){function e(e){if(e.tagName==="TEXTAREA"||e.tagName==="INPUT"&&e.type==="text"){return e.value.substring(e.selectionStart,e.selectionEnd)}return null}var t=e(document.activeElement);document.activeElement.value=document.activeElement.value.replace(t.toString(),"<sarcasm>"+t.toString()+"</sarcasm>")})() | |
| javascript:(function(){function e(e){if(e.tagName==="TEXTAREA"||e.tagName==="INPUT"&&e.type==="text"){return e.value.substring(e.selectionStart,e.selectionEnd)}return null}var t=e(document.activeElement);document.activeElement.value=document.activeElement.value.replace(t.toString(),"<irony>"+t.toString()+"</irony>")})() |
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 formatWords(words){ | |
| if (!words) return ""; | |
| return words.filter(function(a) { return a !== ''}).join(', ').replace(/(, )+(\S+)$/, ' and $2'); | |
| } |
OlderNewer