Skip to content

Instantly share code, notes, and snippets.

View angristan's full-sized avatar
:shipit:
hehehe

Stanislas angristan

:shipit:
hehehe
View GitHub Profile
@bortzmeyer
bortzmeyer / bgproute.md
Created June 20, 2017 11:47
Get the AS (IPv4 only) froma DNS request
bgproute () {
	if [ -z "$1" ]
	then
		echo "Usage: bgproute IP-address"
		return 1
	fi
	dig +short TXT `echo $1 |                awk -F. '{print $4 "." $3 "." $2 "." $1 ".aspath.routeviews.org" }'` | awk -F\" '{print "AS path: " $2 "\nRoute: " $4 "/" $6}'
}
@nusenu
nusenu / potential_seizure_candidates.txt
Last active June 12, 2017 17:12
OVH and Online SAS (FR) based guard-only relays that disappeared between 2017-05-12 and 2017-05-18
Reach me at https://twitter.com/nusenu_ (or via email)
if you have more details.
+---------------------+----------+-----------------+---------------------+--------------------------------+
| last_seen | FP | IP | nickname | contact | comments
+---------------------+----------+-----------------+---------------------+--------------------------------+
| 2017-05-14 22:00:00 | 9E339307 | 37.187.18.109 | 1001001de2 | Admin 0671 D82 F F0 E1 9 3AA |
| 2017-05-18 23:00:00 | 0C2E5558 | 51.255.211.2 | AmnesicProsecutor | NULL |
| 2017-05-15 15:00:00 | 0639612F | 92.222.20.130 | Baki | [email protected] | seized (confirmed by operator)
| 2017-05-12 17:00:00 | F0A13CA9 | 163.172.185.161 | caf4f922534cea81d13 | NULL |
@RobBlackwell
RobBlackwell / configuration.nix
Last active September 7, 2024 16:48
NixOS on Dell XPS 13
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running ‘nixos-help’).
{ config, pkgs, ... }:
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
@andyshinn
andyshinn / Dockerfile
Last active August 8, 2023 08:39
Postal on Docker
FROM ruby:2.3-onbuild
VOLUME /opt/postal/config
ENV LOG_TO_STDOUT 1
ENV AM_CONFIG_ROOT /opt/postal/config
RUN gem install procodile
RUN apt-get update -qq && apt-get install -yqq nodejs
@lummie
lummie / enum.go
Last active March 24, 2025 01:09
Golang Enum pattern that can be serialized to json
package enum_example
import (
"bytes"
"encoding/json"
)
// TaskState represents the state of task, moving through Created, Running then Finished or Errorred
type TaskState int
@marcan
marcan / linux.sh
Last active July 21, 2024 14:00
Linux kernel initialization, translated to bash
#!/boot/bzImage
# Linux kernel userspace initialization code, translated to bash
# (Minus floppy disk handling, because seriously, it's 2017.)
# Not 100% accurate, but gives you a good idea of how kernel init works
# GPLv2, Copyright 2017 Hector Martin <[email protected]>
# Based on Linux 4.10-rc2.
# Note: pretend chroot is a builtin and affects the current process
# Note: kernel actually uses major/minor device numbers instead of device name
@heppu
heppu / ARCH_INSTALL.MD
Last active December 26, 2024 10:38
Installing Arch with GPT, dm-crypt, LUKS, LVM and systemd-boot

Create bootable USB

dd bs=4M if=/path/to/archlinux.iso of=/dev/sdx status=progress oflag=sync

Boot from USB and set prepare system

loadkeys <your-keymap>
anonymous
anonymous / nightly
Created December 24, 2016 18:53
cm_builds
https://download.cyanogenmod.org/get/tf201-latest.zip
https://download.cyanogenmod.org/get/tf700t-latest.zip
https://download.cyanogenmod.org/get/tf300t-latest.zip
https://download.cyanogenmod.org/get/tf701t-latest.zip
https://download.cyanogenmod.org/get/Z00A-latest.zip
https://download.cyanogenmod.org/get/Z008-latest.zip
https://download.cyanogenmod.org/get/Z00L-latest.zip
https://download.cyanogenmod.org/get/Z00T-latest.zip
https://download.cyanogenmod.org/get/P024-latest.zip
https://download.cyanogenmod.org/get/encore-latest.zip
@justjanne
justjanne / Price Breakdown.md
Last active April 5, 2025 08:10 — forked from kylemanna/price.txt
Server Price Breakdown: DigitalOcean, Amazon AWS LightSail, Vultr, Linode, OVH, Hetzner, Scaleway/Online.net:

Server Price Breakdown: DigitalOcean, Amazon AWS LightSail, Vultr, Linode, OVH, Hetzner, Scaleway/Online.net:

Permalink: git.io/vps

$5/mo

Provider Type RAM Cores Storage Transfer Network Price
@wojteklu
wojteklu / clean_code.md
Last active April 11, 2025 01:35
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules