- only relevant files/changes are staged
- imperative tone is used without past tense
- type is referenced by the first word:
--
feat
: a new feature --fix
: a bug fix --docs
: changes to documentation --style
: formatting, missing semi colons, etc; no code change --refactor
: refactoring production code --test
: adding tests, refactoring test; no production code change --chore
: updating build tasks, package manager configs, etc; no production code change
This file contains 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
import string | |
import sys | |
import re | |
# define method that can censor a string | |
def censor(the_input, blacklist, replacements): | |
# create a receptacle for the censored output | |
censored = [] | |
# split input into words, using the regex split method to preverve formatting | |
words = re.split(r'(\s+)', the_input) |
This file contains 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
AuthName "Secure Area" | |
AuthType Basic | |
AuthUserFile /path/to/your/directory/.htpasswd | |
require valid-user |
This file contains 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 | |
# prepend creation date to file names in format `YYY-MM-DD original_file_name` | |
for file in *; do | |
thedate=$(date -r $(stat -f %B "$file") +%Y-%m-%d) | |
echo "renaming \"$file\" to \"$thedate $file\"" | |
mv -v "$file" "$thedate $file" | |
done |
This file contains 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 detectDevices = { | |
iOS: function() { | |
return /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream; | |
}, | |
Safari: function() { | |
return !!navigator.userAgent.match(/safari/i) && !navigator.userAgent.match(/chrome/i) && typeof document.body.style.webkitFilter !== "undefined" && !window.chrome; | |
} | |
} |
This file contains 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>Title of your document</title> | |
<meta charset="utf-8"> | |
<meta name="description" content="description of your document"> | |
</head> | |
<body> |
This file contains 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
set theDate to current date | |
=> date object | |
set theDate to current date as string | |
=> Thursday, December 03, 2015 at 09:57:25 | |
set theDate to current date | |
set y to rich text -4 thru -1 of ("0000" & (year of theDate)) | |
set m to rich text -2 thru -1 of ("00" & ((month of theDate) as integer)) | |
set t to rich text -2 thru -1 of ("00" & (day of theDate)) |
This file contains 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
/etc/nginx/nginx.conf | |
gzip on; | |
gzip_vary on; | |
gzip_disable "MSIE [1-6]\\.(?!.*SV1)"; | |
gzip_http_version 1.1; | |
gzip_types text/plain text/html text/css application/javascript text/javascript application/x-javascript text/xml application/xml application/xml+rss; |
This file contains 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
/* To target IE 6 and 7 */ | |
@media screen\9 { | |
body { background: red; } | |
} | |
/* To target IE 6, 7 and 8 */ | |
@media \0screen\,screen\9 { | |
body { background: green; } | |
} |
This file contains 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
# dump | |
mysqldump -h mysql.server.org -u MyUser -pMyPass MyDB > MyDump.sql | |
# restore | |
mysql -h mysql.server.org -u MyUser -pMyPass MyDB < MyDump.sql |
OlderNewer