sudo mkdir /mnt/mounting_point
sudo blkid
alias sshkey="cat ~/.ssh/id_rsa.pub | pbcopy && echo 'Copied to clipboard.'" |
#!/bin/bash | |
# Reload a varnish config | |
# Author: Kristian Lyngstol | |
FILE="/etc/varnish/ugc.vcl" | |
# Hostname and management port | |
# (defined in /etc/default/varnish or on startup) | |
HOSTPORT="localhost:6082" | |
NOW=`date +%s` |
Lots of people have asked, so here are a few common tasks you might do in your templates, as they would be written in ExpressionEngine vs. Craft.
# Install dependencies | |
# | |
# Setup adjustable vars | |
NGX_MODULE_PATH=$HOME/source | |
NGX_VERSION=1.10.2 | |
OPENSSL_VERSION=1.0.2j | |
NGX_MODULE_ECHO=0.60 | |
NGX_MODULE_CACHEPURGE=2.3 | |
NGX_MODULE_HEALTHCHECK=0.3.0 |
#!/bin/bash | |
## Copyright (C) 2009 Przemyslaw Pawelczyk <przemoc@gmail.com> | |
## | |
## This script is licensed under the terms of the MIT license. | |
## https://opensource.org/licenses/MIT | |
# | |
# Lockable script boilerplate | |
# If using on macOS, try https://github.com/discoteq/flock | |
### HEADER ### |
{# | |
Ternary Statements: Ternaries evaluate the variable | |
based on whether it is truthful | |
#} | |
{{ foo ? 'yes' : 'no' }} {# Returns 'yes' or 'no' #} | |
{{ foo ?: 'no' }} {# Returns foo or 'no' #} | |
{{ foo ? 'yes' }} {# Returns 'yes' or nothing #} | |
{# |
server { | |
server_name $domain_name; | |
root /var/www; | |
index index.html index.php; | |
access_log /var/log/nginx/access.log; | |
error_log /var/log/nginx/error.log; | |
# Cache static files for as long as possible | |
location ~* \.(?:xml|ogg|mp3|mp4|ogv|svg|svgz|eot|otf|woff|ttf|css|js|jpg|jpeg|gif|png|ico)$ { | |
try_files $uri =404; |