Skip to content

Instantly share code, notes, and snippets.

📸
GitHub's new owners gave all their private user data to the NSA 👎

Tom Kenny twome

📸
GitHub's new owners gave all their private user data to the NSA 👎
Block or report user

Report or block twome

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@twome
twome / README.md
Last active Apr 2, 2019
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)

J4cK-r3l473d Gr33tZ

@michaelkonecny
michaelkonecny / close_deleted_files.py
Created Oct 10, 2017
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
"""
import sublime_plugin
import sublime
import time
import os
@theJollySin
theJollySin / OOCheatSheet.java
Last active Aug 24, 2019
Java: an Objected Oriented Cheat Sheet
View OOCheatSheet.java
/**
* The basic class syntax.
*/
public class BasicClass {
public BasicClass() {
// This is the constructor.
}
@brock
brock / nodereinstall.sh
Last active Sep 13, 2019
Complete Node Reinstall. I've moved this to a repo at http://git.io/node-reinstall
View nodereinstall.sh
#!/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 Sep 20, 2019
PostgreSQL command line cheatsheet
View postgres-cheatsheet.md

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 Dec 25, 2015
A pledge for people who want to make a statement about making our industry better.
View i-pledge-to-be-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.
@robfletcher
robfletcher / _safe-rgba.scss
Created May 17, 2013
SASS mixin that uses modernizr to output fallback color property for browsers that don't support RGBA.
View _safe-rgba.scss
/*
* 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;
View bem.md

BEM – meaning block, element, modifier – is a front-end naming methodology. CSSWizardry uses a naming scheme based on BEM, but honed by Nicolas Gallagher. The naming convention follows this pattern:

.block {}
.block__element {}
.block--modifier {}
  • .block represents the higher level of an abstraction or component
  • .block__element represents a descendent of .block that helps form .block as a whole
  • .block--modifier represents a different state or version of .block
@jpmckinney
jpmckinney / bar.js
Last active Dec 16, 2015
Unexpected Yepnope callback order
View bar.js
console.log('bar.js is run (should run 2nd)');
yepnope({
load: 'https://gist.github.com/jpmckinney/5383575/raw/7e4ee538dd6059eea12e207652cf48f1de819364/foo.js',
callback: function () {
console.log('callback in bar.js is run (should run 4th)');
},
complete: function () {
console.log('complete in bar.js is run (should run 5th)');
window.divide = function (a, b) {
@datagrok
datagrok / git-serve.md
Last active May 24, 2019
How to easily launch a temporary one-off git server from any local repository, to enable a peer-to-peer git workflow.
View git-serve.md
You can’t perform that action at this time.