Skip to content

Instantly share code, notes, and snippets.

View jamesramsay's full-sized avatar
🚀

James Ramsay jamesramsay

🚀
View GitHub Profile
@jamesramsay
jamesramsay / README.md
Last active April 26, 2024 13:15
Gmail: delete old emails automatically

Gmail: delete old emails automatically

Automatically deletes old emails that match the specified label.

Get started

  • Create a new Google Apps Script at https://script.google.com
  • Overwrite the placeholder with the javascript below
  • Update the following constants:
  • LABEL_TO_DELETE: the label that should be have old messages deleted
[
{
"name": "SofleKeyboard",
"author": "Josef Adamcik",
"switchMount": "cherry"
},
[
{
"y": 0.2,
"x": 2,
[
{
"name": "SofleKeyboard",
"author": "Josef Adamcik",
"switchMount": "cherry"
},
[
{
"y": 0.2,
"x": 3,
@jamesramsay
jamesramsay / example.rb
Created July 17, 2020 03:15 — forked from mislav/example.rb
Dump objects into YAML using specific style
full_data = {
response: {body: StyledYAML.literal(DATA.read), status: 200},
person: StyledYAML.inline('name' => 'Steve', 'age' => 24),
array: StyledYAML.inline(%w[ apples bananas oranges ])
}
StyledYAML.dump full_data, $stdout
__END__
{
@jamesramsay
jamesramsay / init.d.homebridge.sh
Created April 22, 2020 06:01 — forked from gregwym/init.d.homebridge.sh
Homebridge init.d script
#!/bin/sh
### BEGIN INIT INFO
# Provides: homebridge
# Required-Start: $network $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop:
# Description: HomeKit support for the impatient
### END INIT INFO
# -*- coding: utf-8 -*-
@jamesramsay
jamesramsay / books.md
Last active December 9, 2019 03:11
Books I finished reading

Books I finished reading in 2019.

  • Death's End - Cixin Liu
  • Surprised by Hope - N. T. Wright
  • Why Liberalism Failed - Patrick Deneen
  • Escaping the Build Trap - Melissa Perri
  • Childhood's End - Arthur C. Clarke
  • Dune - Frank Herbert

Books I finished reading in 2018.

@jamesramsay
jamesramsay / Pandoc
Last active June 4, 2018 00:37 — forked from schmurfy/gist:3199254
Pandoc install for converting Pandoc to TeX to PDF
# Install MacTex: http://mirror.ctan.org/systems/mac/mactex/mactex-basic.pkg
$ sudo chown -R `whoami` /usr/local/texlive
$ tlmgr update --self
# Install tufte-latex and dependencies
$ tlmgr install tufte-latex
$ tlmgr install changepage
$ tlmgr install paralist
$ tlmgr install titlesec
@jamesramsay
jamesramsay / brewery.coffee
Created June 16, 2014 10:52
Cassowary.js example
# PROBLEM: Small brewery produces ale and beer
# Production is limited by scarce resources: corn, hops, barley malt.
# Recipes for ale and beer require differenty proportions of resources
#
# Ale (barrel)
# - 5lb corn
# - 4oz hops
# - 35lb malt
# - $13 profit
#
@jamesramsay
jamesramsay / README.md
Last active June 10, 2017 23:06
HAR analysis

Analysis of editorial vs advertising content

Methodology:

  • Access mobile site using Chrome device debugging tools
  • Record network activity
  • Save as HAR
  • Clean recording

Clean Recording

Keybase proof

I hereby claim:

  • I am jamesramsay on github.
  • I am jramsay (https://keybase.io/jramsay) on keybase.
  • I have a public key whose fingerprint is FF28 FAB1 8CD4 198C 2658 4CF1 642F EA93 2DC9 67CB

To claim this, I am signing this object: