Skip to content

Instantly share code, notes, and snippets.

View brodock's full-sized avatar

Gabriel Mazetto brodock

View GitHub Profile
@timothyham
timothyham / ipv6guide.md
Last active September 19, 2024 14:53
A Short IPv6 Guide for Home IPv4 Admins

A Short IPv6 Guide for Home IPv4 Admins

This guide is for homelab admins who understand IPv4s well but find setting up IPv6 hard or annoying because things work differently. In some ways, managing an IPv6 network can be simpler than IPv4, one just needs to learn some new concepts and discard some old ones.

Let’s begin.

First of all, there are some concepts that one must unlearn from ipv4:

Concept 1

@HarvsG
HarvsG / tradfriZHAhowtos.md
Last active September 2, 2024 21:26
Adding IKEA Tradfri Devices with ZHA on Home Assistant

Shortcut and On/Off switches

  1. Remove back cover with philips scredriver and instert provided battery
  2. In home assistant select a ZHA always-on zigbee device - such as a powered light or signal repeater in the same room the shortcut button will end up in
  3. Select "Add device via this device"
  4. Press the pair button 4 times on the back of the shortcut button
  5. Wait
  6. If using an On/Off switch and you want to bind it to a bulb for non-controller dependant control (i.e will work if home assistant is down)

Pairing On/Off Switches to IKEA Bulbs

@balloob
balloob / example-card.js
Created February 20, 2021 03:26
Example custom card for Home Assistant. Created during Github Open Source Friday on Feb 19, 2021.
/*
To use in Home Assistant, configure card:
type: 'custom:example-card'
entities:
- switch.wemo_insight
- light.bed_light
- light.ceiling_lights
- light.kitchen_lights
@nckroy
nckroy / eran-hammer-oauth2-rant-20120726.md
Created January 21, 2021 00:15
OAuth 2.0 and the Road to Hell

(Scraped from the Internet Wayback Machine. Original content by Eran Hammer / hueniverse.com July 26, 2012)

OAuth 2.0 and the Road to Hell

They say the road to hell is paved with good intentions. Well, that’s OAuth 2.0.

Last month I reached the painful conclusion that I can no longer be associated with the OAuth 2.0 standard. I resigned my role as lead author and editor, withdraw my name from the specification, and left the working group. Removing my name from a document I have painstakingly labored over for three years and over two dozen drafts was not easy. Deciding to move on from an effort I have led for over five years was agonizing.

There wasn’t a single problem or incident I can point to in order to explain such an extreme move. This is a case of death by a thousand cuts, and as the work was winding down, I’ve found myself reflecting more and more on what we actually accomplished. At the end, I reached the conclusion that OAuth 2.0 is a bad

@jarbro
jarbro / symantec-vip-access-totp.md
Last active September 19, 2024 17:39
Generate Symantec VIP Access Token as TOTP

Generate Symantec VIP Access Token as OTP

Recently I came across a web service that required two-factor authentication using the Symantec VIP Access App. I already manage all of my OTP tokens in a different app (If you are on iOS I highly recommend using OTP Auth by Roland Moers.) and did not want to have to use yet another app to generate the TOTP.

There is a way to generate a Symantec VIP Access compatible token very easily if you have access to an environment which can run Python PIP. I happen to have Ubuntu Windows Subsystem Linux running on my machine. (If you are running Windows 10 and don't have this you should really check it out.) Let's get started...

hello

Instructions

Here we install python3-pip and qrencode so we can generate our secret, I

Recon and Attack Vectors from My Logs

This document contains excerpts from my web server logs collected over a period of 7 years that shows various kinds of recon and attack vectors.

There were a total of 37.2 million lines of logs out of which 1.1 million unique HTTP requests (Method + URI) were found.

$ sed 's/^.* - - \[.*\] "\(.*\) HTTP\/.*" .*/\1/' access.log > requests.txt
@gmmcal
gmmcal / .gitlab.yml
Created August 17, 2018 21:20
FTP deployment with Dandelion gem and Gitlab
before_script:
- apt-get update -qq && apt-get install -y -qq pkg-config cmake
- ruby -v
- which ruby
- gem install dandelion --no-ri --no-rdoc
- gem install net-sftp --no-ri --no-rdoc
deploy:
script:
- dandelion deploy $CI_COMMIT_SHA
@johncarney
johncarney / yaml-with-lines.rb
Last active June 8, 2022 13:15
A Psych-based YAML parser that captures line numbers
#!/usr/bin/env ruby
# Custom Psych parser that captures line number information from a YAML file.
#
# For a project I'm working on I need to be able to determine which line(s) in a YAML
# file a particular value comes from. There are a few bits of advice on the internet
# about this, the best of them that I've found involves monkey-patching, which is a
# fairly low bar for "best" in my opinion. I found it on Stack Overflow:
#
# https://stackoverflow.com/questions/29462856/loading-yaml-with-line-number-for-each-key
require 'fiddle'
SIZEOF_HEAP_PAGE_HEADER_STRUCT = Fiddle::SIZEOF_VOIDP
SIZEOF_RVALUE = 40
HEAP_PAGE_ALIGN_LOG = 14
HEAP_PAGE_ALIGN = 1 << HEAP_PAGE_ALIGN_LOG # 2 ^ 14
HEAP_PAGE_ALIGN_MASK = ~(~0 << HEAP_PAGE_ALIGN_LOG) # Mask for getting page address
REQUIRED_SIZE_BY_MALLOC = Fiddle::SIZEOF_SIZE_T * 5 # padding needed by malloc
HEAP_PAGE_SIZE = HEAP_PAGE_ALIGN - REQUIRED_SIZE_BY_MALLOC # Actual page size
@mdo
mdo / 00-intro.md
Last active June 25, 2024 18:16
Instructions for how to affix an Ikea Gerton table top to the Ikea Bekant sit-stand desk frame.

Ikea Bekant standing desk with Gerton table top