Skip to content

Instantly share code, notes, and snippets.

View benjaminparry's full-sized avatar
🙇

Benjamin Parry benjaminparry

🙇
View GitHub Profile
@trys
trys / README.md
Created January 10, 2020 23:29
Twitter logout on scroll

Twitter logout on scroll

Source

Idea by Benjamin Parry.

I’m in the market for a browser extension that launches the log out modal after 3 scrolls of my Twitter feed.

Paging @trysmudford

@thikade
thikade / mcp.desktop
Last active July 27, 2024 05:54
control minecraft-pi using xbox controller on raspberry pi
[Desktop Entry]
Name=Minecraft Pi MCP
Comment=Fun with Blocks
# TryExec=minecraft-pi
Exec=/home/pi/mcp.sh
Icon=/usr/share/pixmaps/minecraft-pi.png
Terminal=false
Type=Application
Categories=Application;Game;
StartupNotify=true
@adactio
adactio / minimal-serviceworker.js
Last active August 18, 2023 09:15
An attempt at a minimal viable service worker.
// Licensed under a CC0 1.0 Universal (CC0 1.0) Public Domain Dedication
// http://creativecommons.org/publicdomain/zero/1.0/
// HTML files: try the network first, then the cache.
// Other files: try the cache first, then the network.
// Both: cache a fresh version if possible.
// (beware: the cache will grow and grow; there's no cleanup)
const cacheName = 'files';
@benjaminparry
benjaminparry / data set example - original.csv
Created September 1, 2017 10:22
Transpose survey response dataset with Open Refine (previously Google Refine)
We can make this file beautiful and searchable if this error is corrected: It looks like row 2 should actually have 65 columns, instead of 7 in line 1.
Collector ID,Response ID,Task1 ,Task2,Task3,Task4,Task5,Task6,Task7,Task8,Task9,Task10,Task11,Task12,Task13,Task14,Task15,Task16,Task17,Task18,Task19,Task20,Other Task,Task Importance 1,Task Importance 2,Task Importance 3,Task Importance 4,Task Importance 5,Task Importance 6,Task Importance 7,Task Importance 8,Task Importance 9,Task Importance 10,Task Importance 11,Task Importance 12,Task Importance 13,Task Importance 14,Task Importance 15,Task Importance 16,Task Importance 17,Task Importance 18,Task Importance 19,Task Importance 20,Custom Task Importance,Task Satisfaction 1,Task Satisfaction 2,Task Satisfaction 3,Task Satisfaction 4,Task Satisfaction 5,Task Satisfaction 6,Task Satisfaction 7,Task Satisfaction 8,Task Satisfaction 9,Task Satisfaction 10,Task Satisfaction 11,Task Satisfaction 12,Task Satisfaction 13,Task Satisfaction 14,Task Satisfaction 15,Task Satisfaction 16,Task Satisfaction 17,Task Satisfaction 18,Task Satisfaction 19,Task Satisfaction 20,Custom Task Satisfaction
11111,54321,Task1 ,,,,Task
@gingemonster
gingemonster / WarGames.js
Created December 7, 2016 19:07
Micromonsters Episode 7 - WarGames code
let opponentsmissile: game.LedSprite = null
let missile: game.LedSprite = null
let switchxposition = 0
let player = game.createSprite(2, 4)
let nummissles = 0
input.onButtonPressed(Button.A, () => {
player.change(LedSpriteProperty.X, -1)
})
input.onButtonPressed(Button.B, () => {
player.change(LedSpriteProperty.X, 1)
@sskylar
sskylar / tags.html
Last active January 26, 2021 13:40
Sort Jekyll tags by popularity (number of posts)
<ul>
{% capture tags %}
{% for tag in site.tags %}
<li data-sort="{{ site.posts.size | minus: tag[1].size | prepend: '0000' | slice: -4, 4 }}">
<a href="/{{ site.tag_page_dir }}/{{ tag[0] | slugify: 'pretty' }}">{{ tag[0] }} <span>{{ tag[1].size }}</span></a>
</li>
{% endfor %}
{% endcapture %}
{{ tags | split:'</li>' | sort | join:'</li>' }}
</ul>
@bobbygrace
bobbygrace / trello-css-guide.md
Last active December 10, 2024 21:04
Trello CSS Guide

Hello, visitors! If you want an updated version of this styleguide in repo form with tons of real-life examples… check out Trellisheets! https://github.com/trello/trellisheets


Trello CSS Guide

“I perfectly understand our CSS. I never have any issues with cascading rules. I never have to use !important or inline styles. Even though somebody else wrote this bit of CSS, I know exactly how it works and how to extend it. Fixes are easy! I have a hard time breaking our CSS. I know exactly where to put new CSS. We use all of our CSS and it’s pretty small overall. When I delete a template, I know the exact corresponding CSS file and I can delete it all at once. Nothing gets left behind.”

You often hear updog saying stuff like this. Who’s updog? Not much, who is up with you?

@kalinchernev
kalinchernev / countries
Created October 6, 2014 09:42
Plain text list of countries
Afghanistan
Albania
Algeria
Andorra
Angola
Antigua & Deps
Argentina
Armenia
Australia
Austria
/*
Standard way you can change title based upon collection page, keep in mind that the collections yaml meta becomes available
to it's layout file under the model namespace.
model.title will be pulled from the collections page yaml meta
*/
<!doctype html>
<html lang="en" class="no-js">
<head>
@jhogue
jhogue / gist:6370800
Last active December 21, 2015 21:49
Diagnostic CSS rules for finding poorly formed, non-semantic, inaccessible markup on links and buttons, mostly. For more diagnostics, check out http://www.tomato-root.com/sandbox/holmes/ and https://github.com/diagnosticss/diagnosticss
@mixin heydon_rules {
// Adapted from http://coding.smashingmagazine.com/2013/08/20/semantic-css-with-intelligent-selectors/
// I removed the Comic Sans font declaration because, well, I really can't stand it, even in this context
%uglystyle {
display: block !important;
background: pink !important;
padding: 0.5em !important;
color: #000 !important;