Skip to content

Instantly share code, notes, and snippets.

View onebree's full-sized avatar

Hunter onebree

View GitHub Profile
@IanColdwater
IanColdwater / twittermute.txt
Last active April 3, 2024 19:43
Here are some terms to mute on Twitter to clean your timeline up a bit.
Mute these words in your settings here: https://twitter.com/settings/muted_keywords
ActivityTweet
generic_activity_highlights
generic_activity_momentsbreaking
RankedOrganicTweet
suggest_activity
suggest_activity_feed
suggest_activity_highlights
suggest_activity_tweet
@peterc
peterc / inboxcheck.rb
Last active April 30, 2020 22:12
A Ruby script that checks a Gmail inbox for new mail and shares info about how it was classified
# inboxcheck.rb monitors a Gmail account for new mails and returns
# info (as JSON) about the first new mail from a specified address
#
# This is used to see if our newsletter testing mails arrive at
# Gmail and then if they go into spam, promotions or the normal inbox.
#
# To use or work on this script for yourself, follow steps 1 and 2 at
# https://developers.google.com/gmail/api/quickstart/ruby to get set
# up with the Google API stuff. Make sure client_secret.json ends up
# in the same directory as this script, then you're good to go.

FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.


Effective Engineer - Notes

What's an Effective Engineer?

@shanielh
shanielh / readme.md
Last active November 21, 2016 18:35
Witch!

Usage

./witch.sh terraform

Result

 _________________________________________
@keikoro
keikoro / repo_from_cli.md
Last active November 14, 2018 15:42
Create repositories on GitHub, GitLab, Bitbucket from the command line.

there's a bash script for this now: clirepo

@wasi0013
wasi0013 / brainfry.py
Created August 4, 2016 16:46
encrypts text as unicode-emoji and decrypts encrypted unicode-emoji as text
__author__ = "wasi0013"
import urllib2
from bs4 import BeautifulSoup
import re
from fractions import gcd
import random
def affine_encrypt(text, a, b, m=26):
@KazWolfe
KazWolfe / ProgrammerMilk.java
Last active July 15, 2016 02:07
Programmer Milk
// Inspired by the joke:
// "A programmer was walking out the door for work when
// his wife said, 'While you're out, buy some milk.'
// The programmer never came home.
programmer.getToDoList().getLocationList().addItem(Location.ANYWHERE, () -> {programmer.moveTo(Location.SUPERMARKET);});
programmer.getToDoList().getLocationList().addItem(Location.SUPERMARKET, (neededAmount) -> {
// Get the price and inventory from the Economy.
double price = Economy.getStore(Store.SUPERMARKET).getInventory().getItemClass(ItemClass.MILK).getPrice();
#!/usr/bin/env ruby
hosts = '/etc/hosts'
lines = []
blocked_sites_section = false
File.open(hosts, 'r') do |f|
while line = f.gets
@fredley
fredley / recipes.py
Created May 17, 2016 09:13
BBC recipe archive tool
"""
Save a copy of all BBC recipes as JSON files.
Instructions:
Run this file with Python 3 in an environment with BeautifulSoup4 and requests:
virtualenv -p python3 env
source env/bin/activate
pip install requests beautifulsoup4