Skip to content

Instantly share code, notes, and snippets.

View twome's full-sized avatar
💼
Looking for a job

Tom Kenny twome

💼
Looking for a job
View GitHub Profile
@twome
twome / Cepha's Note
Last active December 13, 2022 09:23
A Fool's Riddle - STALCRAFT
View Cepha's Note
.rlv dkfhzxoq pf bkl lk viircbmlE
.bobeq rlv qbbJ
.pkxfccrO prlixjlkX cl bpxY
beq lq dkfld j'F
.klfqpxY abkfro beq jloc
oxc qlk bdxppxm akrlodobakr
qbozbp beq
kf akrlc by kxz
aoltppxm beQ
.dkfaxbo obqcx korY
@twome
twome / How to remove Windows paths from WSL path.md
Last active June 27, 2022 02:32 — forked from ilbunilcho/How to remove Windows paths from WSL path.md
How to remove Windows paths from WSL `path` environment variable
View How to remove Windows paths from WSL path.md

[Requires WSL Build 17093 or above]

You can override WSL's settings by editing /etc/wsl.conf in the WSL filesystem. (Normally, this file doesn't exist at first.)

$ sudo vi /etc/wsl.conf

[interop]
appendWindowsPath = false
@twome
twome / yeahnah.js
Last active August 4, 2019 14:32
Nah, yeah, yeah, nah, nah, nah, yeah, nah, nah, yeah, yeah, nah, yeah, nah, nah, yeah, nah, yeah, yeah, nah, yeah, yeah, yeah, nah, nah, yeah, yeah, nah, nah, yeah, yeah, yeah, nah, yeah, yeah, nah, nah, nah, yeah, nah, nah, yeah, yeah, nah, yeah, yeah, yeah, yeah, nah, yeah, yeah, nah, yeah, yeah, yeah, nah, nah, yeah, yeah, nah, nah, yeah, yea…
View yeahnah.js
#!/usr/bin/env node
const uintToBitString = int => {
if (!(int >= 0 && int <= 127)) throw Error('ASCII only, hun.')
let bitString = ''
function f(num){
if (num == 0) return
let rem = num % 2
let div = Math.floor(num / 2)
f(div)
@twome
twome / userChrome.css
Last active April 23, 2023 11:08
Simplified UI stylesheet for Firefox. Mozilla's made some absolutely unfathomable decisions recently.
View userChrome.css
/*
This CSS file customises Firefox' user interface look (colloquially, the "chrome" - no relation to Google Chrome)
It needs to be named exactle 'userChrome.css' and placed in:
- Mac: ~/Library/Application Support/Firefox/Profiles/<RANDOM CHARACTERS>.default/chrome/userChrome.css
You might need to create the `chrome` directory yourself.
To debug these styles, run Firefox's "Browser Toolbox" (the devtools for the browser itself) with `Shift+Opt+Cmd+I` by default.
*/
@twome
twome / README.md
Last active August 2, 2022 10:16
Browser patch: [Twitter] Boring Tweet Remover
View README.md

Hide Twitter users unless they're getting ratio'd. This allows you to effectively hate-follow odious individuals without exhausting your irony supply.

Reveals:

  • "Classic" ratios
  • Coward's Ratios
  • Public Service Announcements (huge RT:fav ratio; also applies to "they beating ur ass in the QRTs"-type scenarios)

J4cK-r3l473d Gr33tZ

@twome
twome / destructured-parameters.js
Last active March 16, 2019 09:04
Clean optional parameters using destructuring
View destructured-parameters.js
function fn(mandatoryParameter, {
optionalA = 'a value',
optionalB = 'another value',
optionalC = 'notice that this is using destructured assignment syntax, not object literal syntax'
} = {} /* unfortunately, we need to specify an empty object default if the consumer provides no object argument */){
// Configuration
this.configurationPropertyNamespace = {
optionalA,
hardCodedConfig: 'we can use the object literal "default" property naming trick to be more terse'
@twome
twome / close_deleted_files.py
Last active January 30, 2019 15:03 — forked from michaelkonecny/close_deleted_files.py
Sublime Text plugin - close tabs containing deleted files on refocus
View close_deleted_files.py
"""
When a view is focused, goes through all open tabs and closes those, whose files don't exist anymore.
Tested in Sublime Text 3.0 macOS 10.14.2
"""
import sublime_plugin
import sublime
import time
import os
View keybase.md

Keybase proof

I hereby claim:

  • I am twome on github.
  • I am twome (https://keybase.io/twome) on keybase.
  • I have a public key ASAXwV-Wr67CXM5yej_r4T0UDwqIFxTxQml453uoRijAlgo

To claim this, I am signing this object:

@twome
twome / labour-statement.md
Last active June 18, 2023 02:58
Where did this code's labour come from?
View labour-statement.md

This work was done using my spare time, using skills I had learned in employment and in more spare time. I have experienced very little oppression in this industry due to gender, age, sexuality, or ethnicity. These are advantages not afforded to the majority of people globally.

I have experienced, alongside all other working-class people, oppression due to class: my time and money that could have been spent writing socially-useful, open-source code (or developing my skills in order to do so) has instead been commanded and sapped by property owners for profit.

This statement was written to keep in mind the social context in which code is written, what kind of people get to write it, and who decides what kind of code gets written.

@twome
twome / today.compiled.css
Last active October 28, 2016 07:36
Trello - Stronger "today" indicator for date-select mini-calendar
View today.compiled.css
/*
Stronger "today" indicator for date-select mini-calendar.
The current "today" indicator already has bold text, but that might be a bit subtle
for some users (especially those with vision impairments or poor font rendering).
This uses a coloured background and a faint light rim that remains when "today"
is also the selected day, to save users from having to select a different
day to double-check they have correctly selected "today". This also helps
for more instantly noticing the current day when skimming through months.