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 e=Math.random()*255, | |
| t=Math.random()*255, | |
| n=Math.random()*255; | |
| document.body.style.backgroundColor="rgb("+Math.round(e)+","+Math.round(t)+","+Math.round(n)+")" |
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(e){ | |
| var t = e.substring(e.indexOf("v=") + 2, e.indexOf("v=") + 13); | |
| if (e.indexOf("youtube.com/watch") != -1) { | |
| window.location = "http://www.youtube.com/embed/" + t + "?autohide=1"; | |
| } else { | |
| alert("You can only use this on YouTube videos, silly"); | |
| } | |
| })(location.href) |
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(e){ | |
| var t = prompt("What do you want to find on " + e + "?"); | |
| window.location = "//www.google.com/search?q=site:" + e + "+" + t; | |
| })(location.hostname) |
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/bash | |
| # download.sh <dir> <file1> <file2>... | |
| tempDir="$1" | |
| #make folder and cd to it | |
| mkdir $tempDir | |
| cd $tempDir |
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/bash | |
| # timer.sh <start> <interval> | |
| start="$1" | |
| interval="$2" | |
| for ((i=$start;i>=1;i--)) | |
| do | |
| printf "$i " |
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
| Array.prototype.contains = function(q){if(this.indexOf(q) != -1){return true}else{return false}} | |
| //["waffles",3.14,"pie"].contains(3.14) --> true | |
| //["waffles",3.14,"pie"].contains("foo") --> 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 rndRGB = function(type){ | |
| var r = Math.round(Math.random()*255); | |
| var g = Math.round(Math.random()*255); | |
| var b = Math.round(Math.random()*255); | |
| switch (type) { | |
| case "array": | |
| return [r,g,b]; break; | |
| case "formatted": | |
| return "rgb("+r+","+g+","+b+")"; break; | |
| default: |
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 $$ = function(sel) { | |
| return document.querySelector(sel); | |
| } | |
| var $$$ = function(sel) { | |
| return document.querySelectorAll(sel); | |
| } | |
| // $$ is equivalent to querySelector | |
| // $$$ is equivalent to querySelectorAll |
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
| java -Xmx2G -jar craftbukkit.jar -o false | |
| pause |
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
| cd /System/Library/Fonts | |
| cp HelveticaNeue.dfont /Users/eddy/Desktop |