Skip to content

Instantly share code, notes, and snippets.

We can make this file beautiful and searchable if this error is corrected: It looks like row 5 should actually have 9 columns, instead of 3 in line 4.
List Entry Name,List Entry Number,Link,Heritage Category,Grade,Location,OS Grid Reference,latitude,longitude
SEWER GAS LAMP,1246769,https://historicengland.org.uk/listing/the-list/list-entry/1246769,Listing,II,SEWER GAS LAMP BISHOPCOURT ROAD Non Civil Parish SHEFFIELD| Sheffield,SK3547184041,53.35207495059936,-1.4685722449868464
SEWER GAS LAMP AT JUNCTION WITH WESTHILL LANE,1271101,https://historicengland.org.uk/listing/the-list/list-entry/1271101,Listing,II,SEWER GAS LAMP AT JUNCTION WITH WESTHILL LANE BROOMHALL STREET Non Civil Parish SHEFFIELD| Sheffield,SK3479987154,53.38009982572962,-1.4783263352645517
SEWER GAS LAMP AT JUNCTION WITH NICHOLSON ROAD,1246499,https://historicengland.org.uk/listing/the-list/list-entry/1246499,Listing,II,SEWER GAS LAMP AT JUNCTION WITH NICHOLSON ROAD KENT ROAD Non Civil Parish SHEFFIELD| Sheffield,SK3560284732,53.35827704651085,-1.4665266837756366
SEWER GAS LAMP AT JUNCTION WITH MONCKTON ROAD,1247376,https://historicengland.org.uk/listing/the-list/list-entry/12473
@alifeee
alifeee / .convert image
Created September 25, 2024 13:13
nautilus convert image script (place in `~/.local/share/nautilus/scripts/`)
#!/bin/bash
# convert an image from something to something else
original_image="${1}"
echo "given file: ${original_image}"
filename="${original_image%.*}"
extension="${original_image##*.}"
@alifeee
alifeee / clone.desktop
Last active September 24, 2024 16:32
quickly clone a github repository (Gnome desktop launcher)
[Desktop Entry]
Version=0.1.0
Name=Git Clone
Comment=Clone a GitHub repository
Exec=/home/alifeee/Desktop/clone.sh
Terminal=true
Type=Application
Categories=Utility;Application;
@alifeee
alifeee / guide.sh
Last active September 1, 2024 12:48
bash script to get the upcoming programmes on BBC TV channels (TV guide)
#!/bin/bash
# get upcoming programs for a BBC TV channel
# https://gist.github.com/alifeee/acf55f9141f534e90eabbb7fceffaf44
# i.e., from the links
# https://www.bbc.co.uk/iplayer/guide/bbcone
# https://www.bbc.co.uk/iplayer/guide/bbctwo
# https://www.bbc.co.uk/iplayer/guide/bbcthree
# https://www.bbc.co.uk/iplayer/guide/bbcfour
# requires:
# pcregrep, jq
@alifeee
alifeee / google-form-to-github-issue.md
Last active August 17, 2024 21:41 — forked from bmcbride/google-form-to-github-issue.md
Create a new GitHub Issue from a Google Form submission

Wiring up a Google Form to GitHub is not that difficult with a little bit of Apps Script automation. All you need is a Google account, a GitHub account, and a web browser...

Set up your GitHub Personal Access Token

Personal access tokens provide an easy way to interact with the GitHub API without having to mess with OAuth. If you don't already have a personal access token with repo or public_repo access, visit your GitHub settings page and generate a new token.

Be sure to copy your token some place safe and keep it secure. Once generated, you will not be able to view or copy the token again.

Set up the Form & Spreadsheet

  1. Create a Google Form.
@alifeee
alifeee / bar.sh
Last active September 1, 2024 11:51
Simple bar chart generation with bash
#!/bin/bash
# make bar chart from $prog, $total, $n_seg as $1 $2 $3
# example:
# > ./bar.sh 25 100 12
# ███░░░░░░░░░
bar () {
# $1 $2 $3 are progress total total_segments
# shows progress/total using total_segments characters
if [ $1 == "0" ] && [ $2 == "0" ]; then
@alifeee
alifeee / naked.sh
Created March 17, 2024 17:06
Remove all CSS styles from HTML files with bash
#!/bin/bash
# script to remove stylesheets, style tags, and inline styles from an HTML file
# 1. remove <link rel="stylesheet" ...>
# 2. remove <style> ... </style>
# 3. remove style="..." attributes
# notes:
# perl "0777" is so that perl sees newlines as "any character" (so <link> can wrap onto new lines)
# "|gms" helps with the same thing. see https://regex101.com/
# example:
# ./naked.sh index.html > index-naked.html
@alifeee
alifeee / ffmpeg-commands.md
Last active July 30, 2024 18:38
FFmpeg commands

FFmpeg Commands

Turn mp4 into gif

Used here. From here.

ffmpeg -y -i input.mp4 -filter_complex "fps=5,scale=480:-1:flags=lanczos,split[s0][s1];[s0]palettegen=max_colors=32[p];[s1][p]paletteuse=dither=bayer" output.gif
@alifeee
alifeee / ruby-and-jekyll-on-linux.md
Created March 14, 2024 20:24
How to use Ruby and Jekyll on Linux

Using Ruby on Linux

Install Ruby + Gems

sudo apt-get install ruby-full
gem install bundler
bundle config set --local path 'vendor/bundle'
bundle install
@alifeee
alifeee / bash-graphs.md
Last active March 15, 2024 18:54
Plot graphs using the terminal (bash)

Bash Graphs

Plot graphs using the terminal. E.g.,

> cat sensor.txt | awk -F ':| *' '{print $2}' | eplot -d -t CO2 2> /dev/null

  4000 +-------------------------------------------------------------------+
       |         +      +.+.+       +         +         +        +         |
       |                :    .+                                CO2 +.....+ |