Skip to content

Instantly share code, notes, and snippets.

View tolsadus's full-sized avatar
🌴
On vacation

tolsadus tolsadus

🌴
On vacation
View GitHub Profile
@tolsadus
tolsadus / networking.md
Last active July 8, 2016 09:24
Networking
  1. if you’re on (most modern distributions of) linux, forget that route(1) even exists (and throw ifconfig out in the same go) because it’s just absolutely frustrating. for probably 98% of what you need, ip(1) is the cool you care about

generally speaking, these will cover you: ip route, ip address, ip link

  1. when dealing with routing problems (​even if just two hosts next to each other​), mtr > traceroute > ping is an order that’s useful for a lot of what you need

mtr is nice because you can just let it keep running. press d in its display to get a running history breakdown of packets. fantastic for intermittent issues!

traceroute is generally known already, but depending on the complexity of your networks in question you may want traceroute-nanog or similar other ones. some of these are ASN-aware, which is useful.

@tolsadus
tolsadus / evil_bot.rb
Created June 23, 2016 09:20 — forked from lambda2/evil_bot.rb
A twitter bot, here designed to work with some active record models, but the logic is there.
require 'twitter'
require 'logger'
# 🐵 patch search results, because they sucks
module Twitter
class SearchResults
attr_reader :rate_limit
@tolsadus
tolsadus / bonjourmadame.rb
Created June 23, 2016 09:18 — forked from lambda2/bonjourmadame.rb
Redirect all bonjour* tumblr posts to a slack channel
require "tumblr_client"
require 'slack-ruby-client'
POST_DELAY = 30.minutes
SLACK_CHANNEL = '#nsfw'
# bonjourmademoiselle.fr dites.bonjourmadame.fr bonjourlesfesses.tumblr.com
TUMBLR_SOURCE = 'bonjourmademoiselle.fr'
PAGE_LENGTH = 20