Skip to content

Instantly share code, notes, and snippets.

@SandNerd
SandNerd / google_voice_texts.py
Created February 4, 2022 01:53
Google Voice Takeout Parser
# Python script to parse google voice takeout messages into csv
# command line arguments
from bs4 import BeautifulSoup
import pandas as pd
import os
import argparse
# construct the argument parser and parse the arguments
ap = argparse.ArgumentParser()
@SandNerd
SandNerd / containerise_list
Last active June 5, 2023 16:36
Ready list of tons of companies for use with Firefox's Containerise extension https://addons.mozilla.org/en-US/firefox/addon/containerise
@^[^/]+//(?!mail|login|guce\.)(?:[^/]+\.)?yahoo\.ac/ , Yahoo
@^[^/]+//(?!mail|login|guce\.)(?:[^/]+\.)?yahoo\.ae/ , Yahoo
@^[^/]+//(?!mail|login|guce\.)(?:[^/]+\.)?yahoo\.at/ , Yahoo
@^[^/]+//(?!mail|login|guce\.)(?:[^/]+\.)?yahoo\.be/ , Yahoo
@^[^/]+//(?!mail|login|guce\.)(?:[^/]+\.)?yahoo\.bg/ , Yahoo
@^[^/]+//(?!mail|login|guce\.)(?:[^/]+\.)?yahoo\.bh/ , Yahoo
@^[^/]+//(?!mail|login|guce\.)(?:[^/]+\.)?yahoo\.ca/ , Yahoo
@^[^/]+//(?!mail|login|guce\.)(?:[^/]+\.)?yahoo\.cm/ , Yahoo
@^[^/]+//(?!mail|login|guce\.)(?:[^/]+\.)?yahoo\.cn/ , Yahoo
@^[^/]+//(?!mail|login|guce\.)(?:[^/]+\.)?yahoo\.co/ , Yahoo

YARD CHEATSHEET http://yardoc.org

Templates to remind you of the options and formatting for the different types of objects you might want to document using YARD.

Modules

# Namespace for classes and modules that handle serving documentation over HTTP
# @since 0.6.0
@SandNerd
SandNerd / gist:10a1b2d3f025cbc18e2bfaa94908fe84
Created August 12, 2016 22:35 — forked from Jauny/gist:3876531
Understanding blocks, Procs and lambda!

#Understanding blocks, Procs and lambdas. I think blocks, Procs and lambdas are working in a really counter-intuitive way when you
first try to understand how they work, and most of the (amazing) resources one can find online
are too complicated to allow to understand how they work without frustration...

So here is my take on it; I'll try to make it as simple and concise as possible,
and will focus on how it is used, instead of how it works under the hood.

##Blocks A block is simply a piece of code that will (usually) execute something;

@SandNerd
SandNerd / ruby_manipulation_tricks.md
Last active September 17, 2016 01:35
Ruby Gems Manipulation

Ruby Gems Manipulation

"hmm, so they didn't give you a decent api to make the changes you need.."

"Can't touch this"

Methods

Removing

@SandNerd
SandNerd / state_machine.md
Created May 25, 2016 05:45
androidstate_machine.md

HierarchicalSM

A state machine which processes messages and can have states arranged hierarchically.

Usage

Construction

State

@SandNerd
SandNerd / burger.rb
Last active March 2, 2016 00:48
Meat transformed into a Burger using Ruby's subclassing, include and prepend
class Meat
def burger
puts "meat"
end
end
class SauceAndMeat < Meat
def burger
puts "sauce"
super # "meat"
@SandNerd
SandNerd / middleman.md
Created December 29, 2015 22:48
Middleman

Middleman

In simple terms, Middleman or any static site generator produces static website, made of HTML, CSS and Java Script files, which can be uploaded to any static host or served from any normal web server. Static, informational, one-way broadcast content sites are often called "brochureware" and are ideal for blogs, curriculum vitae, portfolios, etc.

Middleman is a library for creating static websites written in Ruby, which utilizes some of the power of Rails (the popular Ruby web framework). An easy to use framework, Middleman allows you to build static websites with modern workflows in mind and with a high degree of developer