Skip to content

Instantly share code, notes, and snippets.

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))
  • 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
/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;
/* 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; }
}
# dump
mysqldump -h mysql.server.org -u MyUser -pMyPass MyDB > MyDump.sql
# restore
mysql -h mysql.server.org -u MyUser -pMyPass MyDB < MyDump.sql
Options +MultiViews
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^\.]+)$ $1.php [NC,L]
RewriteRule ^([^\.]+)$ $1.html [NC,L]

Creating a new repository:

mkdir /path/to/new/dir
svnadmin create /path/to/new/dir

Starting svnserve:

svnserve --daemon --root /path/to/new/repository

Importing project into svn repo:

We couldn’t find that file to show.
# https://www.virtualmin.com/documentation/developer/cli/create_user
virtualmin create-user --domain domain.com --user mail --random-pass --quota "UNLIMITED" --real "Name" --extra info@domain.com --extra accounting@domain.com --extra it@domain.com --extra jobs@domain.com --extra support@domain.com --extra team@domain.com
virtualmin modify-user --domain hendersontechnologies.com --user mail --add-forward someone@gmail.com
# https://www.virtualmin.com/documentation/developer/cli/create_domain
virtualmin create-domain --domain domain.com --pass password-for-unix-user