%a Locale’s abbreviated weekday name.
%A Locale’s full weekday name.
%b Locale’s abbreviated month name.
%B Locale’s full month name.
%c Locale’s appropriate date and time representation.
%d Day of the month as a decimal number [01,31].
%f Microsecond as a decimal number [0,999999], zero-padded on the left
%H Hour (24-hour clock) as a decimal number [00,23].
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
| //replace all but links | |
| /<(?!\/?a(?=>|\s.*>))\/?.*?>/g | |
| //validate url | |
| /^(https?:\/\/)?([\da-z\.-]+)\.([a-z\.]{2,6})([\/\w \?=.-]*)*\/?$/ | |
| //Validate US phone number | |
| /^(\+\d)*\s*(\(\d{3}\)\s*)*\d{3}(-{0,1}|\s{0,1})\d{2}(-{0,1}|\s{0,1})\d{2}$/ | |
| //Test if a password is strong |
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
| ssh username@servername.com 'cat /path/to/file.txt' | sdiff - /path/to/file.txt |
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
| ab -k -c 10 -n 100 http://site.to.test |
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
| scp -r user@hostname:path/to/remote ~/Path/to/local |
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
| div[itemscope] { | |
| background: #fffbe0 url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAA8AAAAABCAYAAAARiscXAAAAGklEQVR42u3BAQEAAAABIP9PM0SVAgAAwIEBmTTx01NZasoAAAAASUVORK5CYII=') repeat-y 50% top; | |
| } |
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
| ln -s "/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl" ~/bin/subl |
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 loadScript(url, callback){ | |
| var script = document.createElement("script") | |
| script.type = "text/javascript"; | |
| if (script.readyState){ //IE | |
| script.onreadystatechange = function(){ | |
| if (script.readyState == "loaded" || | |
| script.readyState == "complete"){ | |
| script.onreadystatechange = null; |
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 bash | |
| # Update the box | |
| # -------------- | |
| # Downloads the package lists from the repositories | |
| # and "updates" them to get information on the newest | |
| # versions of packages and their dependencies | |
| apt-get update | |
| # Install Vim |