This gist has been moved to a full repo for better version control and collaboration.
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 | |
# This script will trigger a rebuild on a repo's GitHub Pages site, | |
# without having to create a new commit. | |
# To use this script: | |
# 1. Save this script to an easilyt accessible place, where you'll run it. | |
# 2. Create a personal access token on GitHub. In Your profile > Settings | |
# > Developer settings > Personal access tokens | |
# 3. Save the token in a text file. Idealy, alongside the script as token.txt | |
# 4. Run the script from the Terminal with ./trigger-gh-pages-build.sh |
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
:: 1. Create a file called secrets.ftp beside this one. | |
:: 2. Do not commit secrets.ftp to version control. | |
:: 3. Copy these lines (without the ::s) to it, | |
:: and add your server IP address, FTP username and FTP password: | |
:: open 54.454.4.47 | |
:: ftpusernamehere | |
:: ftppasswordhere | |
:: cd public_html | |
:: lcd public |
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
<?xml version="1.0" encoding="utf-8"?> | |
<key name="Software"> | |
<key name="ConEmu"> | |
<key name=".Vanilla" modified="2020-07-04 17:34:43" build="161206"> | |
<value name="Language" type="string" data="en"/> | |
<value name="StartType" type="hex" data="02"/> | |
<value name="CmdLine" type="string" data=""/> | |
<value name="StartTasksFile" type="string" data=""/> | |
<value name="StartTasksName" type="string" data="{Bash::Git bash}"/> | |
<value name="StartFarFolders" type="hex" data="00"/> |
I've just started using Windows Terminal. Here are tips and settings I'm picking up along the way.
By default WT opens Powershell. I want CMD. Here's how to switch.
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 | |
# This script sets up the Electric Book tools on an Ubuntu 18.04 USB drive. | |
# It assumes a fresh Ubuntu 18.04 install. Anywhere else, use at your own risk. | |
# Tested on a 32GB Sandisk Cruzer Blade drive. | |
# | |
# Before using this script, to create a bootable USB drive: | |
# - On Windows, use Rufus, but changes to the USB will not be saved: | |
# https://tutorials.ubuntu.com/tutorial/tutorial-create-a-usb-stick-on-windows | |
# - On Ubuntu, optionally with the ability to save ('persistence'), use mkusb: |
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 | |
# store the repos dir | |
REPOS_DIR=/var/services/homes/admin/EBW/Dropbox/git-repos | |
# Go into the repos folder | |
cd $REPOS_DIR | |
# Let the person running the script know what's going on. | |
echo "Pulling in latest changes for all repositories..." |
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
<?php | |
/** | |
* The template for displaying single posts and pages, | |
* adapted as an Electric Book WP page for the Twenty Twenty theme | |
* | |
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/ | |
* | |
* @package WordPress | |
* @subpackage Twenty_Twenty | |
* @since Twenty Twenty 1.0 |
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 the Terminal prompt in Ubuntu to: | |
# user directory (git-branch) $ | |
# Add the lines below to your ~/.bashrc file. | |
## Get Git branch | |
parse_git_branch() { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' | |
} | |
## Simplify prompt and add Git branch |