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 clamp(min, max, mid){ | |
| if (min <= max) { // Sanity check | |
| if (mid > max) { | |
| // Also implied: mid is not NaN | |
| return max; | |
| } | |
| if (mid < min) { | |
| // Also implied: mid is not NaN |
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
| # Define has_cats as true | |
| has_cats: [x] | |
| # Same for has_dogs | |
| has_dogs: [x] | |
| # Define has_dinosaurs as false | |
| has_dinosaurs: [_] | |
| # Some expressions |
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
| Tested on http://javascript.info/tutorial/keyboard-events | |
| # English layout | |
| keydown keyCode=87 which=87 charCode=0 char=W | |
| keypress keyCode=119 which=119 charCode=119 char=w | |
| keyup keyCode=87 which=87 charCode=0 char=W | |
| ------------------------------ | |
| keydown keyCode=65 which=65 charCode=0 char=A | |
| keypress keyCode=97 which=97 charCode=97 char=a |
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
| // Create regexp once | |
| var reUnicode = /[\u0080-\uFFFF]/g; | |
| // Create functor once | |
| function _unicodeEscape(character) { | |
| return '\\u' + ('000' + character.charCodeAt(0).toString(16)).slice(-4); | |
| } | |
| function escapeJSON(jsonStr) { | |
| // This function only accepts valid JSON strings |
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
| <svg onload=write()> |
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
| * { | |
| case: lowercase; | |
| max-empty-lines: 4 !warning; | |
| } | |
| selector { | |
| max-empty-lines: 1; | |
| } | |
| *::comma { |
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
| licence: WTFPL | |
| height: 540 | |
| scrolling: no | |
| border: no |
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> | |
| <title>Webpack screensaver</title> | |
| <style> | |
| html, body { | |
| background: #000; | |
| color: #aaa; | |
| margin: 0; | |
| user-select: none; |
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
| <body> | |
| <style> | |
| @media all { | |
| body { | |
| background: url('data:image/gif;base64,\ | |
| R0lGODdhEAAQAKECAAAAAP8AAP///////ywAAAAAEAAQAAACGkyEqWi3z6CctNorALha2759IUaWJuRYjRoUADs= |
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
| #!/bin/sh | |
| git diff --staged --name-only | | |
| sed -e "s/.*/\x1b[41;30mERR\!\x1b[0;1;31m &\x1b[22m: Неправильно, ёбаные волки\! Широкую на широкую\!\x1b[m/g" | |
| false |