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
@joepie91
joepie91 / no-your-cryptocurrency-cannot-work.md
Last active April 13, 2024 03:21
No, your cryptocurrency cannot work

No, your cryptocurrency cannot work

Whenever the topic of Bitcoin's energy usage comes up, there's always a flood of hastily-constructed comments by people claiming that their favourite cryptocurrency isn't like Bitcoin, that their favourite cryptocurrency is energy-efficient and scalable and whatnot.

They're wrong, and are quite possibly trying to scam you. Let's look at why.

What is a cryptocurrency anyway?

There are plenty of intricate and complex articles trying to convince you that cryptocurrencies are the future. They usually heavily use jargon and vague terms, make vague promises, and generally give you a sense that there must be something there, but you always come away from them more confused than you were before.

@twome
twome / README.md
Last active August 2, 2022 10:16
Browser patch: [Twitter] Boring Tweet Remover

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

@michaelkonecny
michaelkonecny / close_deleted_files.py
Created October 10, 2017 15:02
Sublime Text plugin - close tabs containing deleted files on refocus
"""
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
"""
import sublime_plugin
import sublime
import time
import os
@sliminality
sliminality / Default (OSX).sublime-keymap
Last active October 8, 2023 04:47
Racket and Sublime Text 3
{
// Evaluate file in the open SublimeREPL.
// Depends on you creating the Packages/User/EvalInREPL.sublime-macro file.
{ "keys": ["super+r"], "command": "run_macro_file", "args": { "file": "Packages/User/EvalInREPL.sublime-macro" },
"context": [
{ "key": "selector", "operator": "equal", "operand": "source.elm" }
]
},
// Reindent selection on tab
@john-science
john-science / OOCheatSheet.java
Last active January 14, 2021 09:36
Java: an Objected Oriented Cheat Sheet
/**
* The basic class syntax.
*/
public class BasicClass {
public BasicClass() {
// This is the constructor.
}
@brock
brock / nodereinstall.sh
Last active April 17, 2024 08:26
Complete Node Reinstall. I've moved this to a repo at http://git.io/node-reinstall
#!/bin/bash
# node-reinstall
# credit: http://stackoverflow.com/a/11178106/2083544
## program version
VERSION="0.0.13"
## path prefix
PREFIX="${PREFIX:-/usr/local}"
@Kartones
Kartones / postgres-cheatsheet.md
Last active April 25, 2024 16:50
PostgreSQL command line cheatsheet

PSQL

Magic words:

psql -U postgres

Some interesting flags (to see all, use -h or --help depending on your psql version):

  • -E: will describe the underlaying queries of the \ commands (cool for learning!)
  • -l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)
@KuraFire
KuraFire / i-pledge-to-be-better
Last active December 25, 2015 15:59
A pledge for people who want to make a statement about making our industry better.
# I Pledge To Be Better
I want our industry to be a safe, welcoming and inclusive place for everyone, regardless of
their gender, abilities, skin color, sexual orientation, age, class, neuro-diversity or any other attribute.
I acknowledge that this is not currently the case, and will do my best, to the extent that I can
afford to dedicate to this, to help make ours a better community and industry.
I value the diversity of perspectives that people with different backgrounds bring to the table.
I will call out exclusionary practices, behaviors or cultures and see how, together, we can perhaps
reshape them to be inclusive and supportive instead.
@willurd
willurd / web-servers.md
Last active April 26, 2024 18:00
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@robfletcher
robfletcher / _safe-rgba.scss
Created May 17, 2013 08:45
SASS mixin that uses modernizr to output fallback color property for browsers that don't support RGBA.
/*
* Outputs a color property with an opaque fallback for browsers that do not support RGBA.
*/
@mixin safe-rgba($property, $color, $fallback-color: opacify($color, 1)) {
@if opacity($color) == 1 {
#{$property}: $color;
} @else {
#{$property}: $fallback-color;
.rgba & {
#{$property}: $color;