- Run each command separately
- Move files to correct directory
mv * ~/path/to/image_directory
NB: create each directory first
// Google Apps Script to automatically get stats within a Gmail inbox | |
// Stats logged: | |
// - current date & time | |
// - username / email address | |
// - # of message threads in inbox | |
// - Age in days of oldest message | |
// 1. Visit https://script.google.com and create a new project | |
// 2. Name the project | |
// 3. Copy and paste this gist |
# Shell script to automatically backup current branch to GitHub | |
git add . | |
git commit -m "Automatic daily backup via cronjob" | |
git push | |
# Instructions | |
# 1. SSH into the server | |
# 2.1 Create this file at root of the repo to backup: $ touch autobackup.sh | |
# 2.2 Add the commands shown in this file: $ vim autobackup.sh |
<script> | |
/* | |
crc-reload is a script to auto reload the current page when you save the html. | |
Version 0.1 - Initial release | |
Usage: | |
Requires jquery (stable with v1.6.2+) | |
Include this js file in your html page. | |
It will ajax GET poll the current page every second and if the html is different, reload itself. | |
Useful on a dev site within an environment conditional. |
RewriteEngine On | |
# | |
# Redirect all http and www traffic to https non-www URL | |
# Ref for all but first line: https://simonecarletti.com/blog/2016/08/redirect-domain-http-https-www-apache/ | |
# Ref to correct for Webfaction using nginx ssl proxy: cpbotha.net... https://goo.gl/Vnbdw9 | |
# | |
RewriteCond %{HTTP:X-Forwarded-SSL} !on [OR] | |
RewriteCond %{HTTP_HOST} ^www\. [NC] | |
RewriteCond %{HTTP_HOST} ^(?:www\.)?(.+)$ [NC] | |
RewriteRule ^ https://%1%{REQUEST_URI} [L,NE,R=301] |
[user] | |
name = wesort | |
email = [email protected] | |
[push] | |
default = simple | |
[alias] | |
lg = "log --oneline -n 10 --decorate --graph --format=\"%C(auto)%h%Creset %C(auto)%d%Creset %s %C(auto)(%an, %ad)%Creset\" --date=format:\"%d %b %Y at %H:%M\"" | |
lg-all = log --all --decorate --oneline --graph | |
conflict = diff --name-only --diff-filter=U | |
goback = !git reset --hard HEAD && git clean -fd |
... | |
# FORGE CONFIG (DO NOT REMOVE!) | |
include forge-conf/example.com/server/*; | |
# For legacy URL redirect with query parameters | |
# - create a file called "legacy-redirect.map" with a new line for each redirect | |
# - example line: /old-url/with?query /new-url/without-a-query; | |
# - Add the following BEFORE the server block, update the path and uncomment the include line | |
map $uri$is_args$args $new_uri { | |
default 0; |
... | |
# FORGE CONFIG (DO NOT REMOVE!) | |
include forge-conf/example.com/server/*; | |
# Start selecting and copying below | |
################################################# | |
# Edit the domain below | |
error_log /var/log/nginx/example.com-error.log error; | |
location / { | |
if ($request_uri ~ ^/(.*)\.html$) { | |
return 302 /$1?$args; | |
} | |
try_files $uri $uri.html $uri/ =404; | |
} | |
error_page 404 /404.html; |
{"userAgent":"Mozilla/5.0 (X11; CrOS x86_64 12239.57.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.90 Safari/537.36","environment":{"networkUserAgent":"Mozilla/5.0 (X11; CrOS x86_64 12239.57.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.90 Safari/537.36","hostUserAgent":"Mozilla/5.0 (X11; CrOS x86_64 12239.57.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.90 Safari/537.36","benchmarkIndex":604},"lighthouseVersion":"5.1.0","fetchTime":"2019-08-07T12:06:06.801Z","requestedUrl":"https://wesort.co.uk/","finalUrl":"https://wesort.co.uk/","runWarnings":[],"audits":{"is-on-https":{"id":"is-on-https","title":"Uses HTTPS","description":"All sites should be protected with HTTPS, even ones that don't handle sensitive data. HTTPS prevents intruders from tampering with or passively listening in on the communications between your app and your users, and is a prerequisite for HTTP/2 and many new web platform APIs. [Learn more](https://developers.google.com/web/tools/lighthouse/audits/ht |