Skip to content

Instantly share code, notes, and snippets.

Avatar

Arthur Attwell arthurattwell

View GitHub Profile
@arthurattwell
arthurattwell / deploy.bat
Last active Jul 27, 2020
FTP deploy from Windows
View deploy.bat
:: 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
@arthurattwell
arthurattwell / gmail.css
Last active Oct 28, 2020
Nicer Gmail styles with Stylus, Gmail's dark theme, and simpl.fyi
View gmail.css
/* Extra styles for Gmail applied with Stylus
in combination with Gmail's dark theme
and the simpl.fyi Firefox extension */
/* Max width on email */
table.Bs.nH.iY.bAt {
max-width: 50em;
margin: auto;
}
@arthurattwell
arthurattwell / stylus_basecamp-dark.css
Last active Aug 6, 2020
Dark mode for Basecamp 3 with Stylus
View stylus_basecamp-dark.css
/* Work in progress.
A Basecamp 3 dark theme for Stylus
(https://addons.mozilla.org/en-US/firefox/addon/styl-us/)
based on https://userstyles.org/styles/177262/basecamp-insomnia */
:root
{
--bg-md: #18242b;
--bg-md-2: #152025;
--bg-lt: #213038;
View windows-terminal-tips.md

Using Windows Terminal

I've just started using Windows Terminal. Here are tips and settings I'm picking up along the way.

Set default shell

By default WT opens Powershell. I want CMD. Here's how to switch.

@arthurattwell
arthurattwell / merge-a-forked-gist.md
Created May 4, 2020
Merge someone's fork of your gist into your gist
View merge-a-forked-gist.md

How to merge someone's fork of your gist into your gist

I created a gist, then someone else forked it and improved it. With a full repository, I might get their improvements in a pull request. But that isn't availabe for gists.

This is how to get their changes into my gist.

  1. Clone your own gist

     git clone git@gist.github.com:YOUR_GIST_ID_GOES_HERE.git
    
@arthurattwell
arthurattwell / singular-restricted.php
Created Apr 23, 2020
Sample template-part for Electric Book WP restricted pages
View singular-restricted.php
<?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
@arthurattwell
arthurattwell / userChrome.css
Last active Jul 1, 2020
Add numbers to Firefox tabs for easier Ctrl+n tab switching
View userChrome.css
/* userChrome.css can change the Firefox UI.
For details, see https://www.userchrome.org/
Instructions
------------
Save it to your Firefox 'Profile Folder'. To find that folder:
enter about:support in the Firefox address bar and look for it in the list.
Save this file to that folder. Then tell Firefox to load it:
enter about:config in the address bar, and search for userprof
and if that setting exists, set the following value to true:
@arthurattwell
arthurattwell / trigger-gh-pages-build.sh
Last active Sep 4, 2020
Trigger a GitHub Pages rebuild
View trigger-gh-pages-build.sh
#!/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
@arthurattwell
arthurattwell / create-files-list.md
Last active Jan 21, 2020
Create a files.txt list for an Electric Book project's update folder
View create-files-list.md

Create a files.txt list

Windows

dir /a-D /S /B > files.txt

  • To remove .git folder, replace: ^\.git\\.*\n
  • To remove sass-cache, replace: ^\.sass-cache\\.*\n
  • To remove node_modules, replace: ^node_modules\\.*\n
  • To remove _site folder, replace: ^_site\\.*\n
@arthurattwell
arthurattwell / _Jekyll-deploy-with-CodeShip-Basic.md
Last active Jun 30, 2020
Test and deploy a Jekyll site with CodeShip Basic
View _Jekyll-deploy-with-CodeShip-Basic.md

Test and deploy a Jekyll site with CodeShip Basic

This gist has been moved to a full repo for better version control and collaboration.

You can’t perform that action at this time.