Skip to content

Instantly share code, notes, and snippets.

View arthurattwell's full-sized avatar

Arthur Attwell arthurattwell

View GitHub Profile
/* Extra styles for Gmail applied with Stylus
in combination with Gmail's dark theme
and the simpl.fyi Gmail v2 Firefox extension */
/* System fonts for Gmail */
.yW,
.hx .gD,
.xY,
.zA > .a4W,
.zA > .xW,
@arthurattwell
arthurattwell / deploy.bat
Last active July 27, 2020 10:24
FTP deploy from Windows
:: 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 February 11, 2021 06:50
Nicer Gmail styles with Stylus, Gmail's dark theme, and simpl.fyi [deprecated]
/* 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 June 16, 2021 22:49
Dark mode for Basecamp 3 with Stylus
/* 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;
@arthurattwell
arthurattwell / windows-terminal-tips.md
Created May 21, 2020 11:11
Using Windows Terminal

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 12:22
Merge someone's fork of your gist into your gist

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 April 23, 2020 13:10
Sample template-part for Electric Book WP restricted pages
<?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 July 3, 2023 11:51
Add numbers to Firefox tabs for easier Ctrl+n tab switching
/* 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 September 4, 2020 02:32
Trigger a GitHub Pages rebuild
#!/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 January 21, 2020 12:23
Create a files.txt list for an Electric Book project's update folder

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