Skip to content

Instantly share code, notes, and snippets.

View brett-schneider's full-sized avatar

brett-schneider

View GitHub Profile
@brett-schneider
brett-schneider / network-namespace-demo.sh
Created November 23, 2022 19:02 — forked from agentzh/network-namespace-demo.sh
Create 2 network namespaces and bridge them and the default namespace together so that they can directly talk to each other via static IP addresses; also enable Internet access in all the namespaces via NAT.
#!/usr/bin/env bash
set -x
main_if=ens33
ping_count=1
echo 1 > /proc/sys/net/ipv4/ip_forward || exit 1
ip netns del ns1 > /dev/null 2>&1
@brett-schneider
brett-schneider / drplanoAutoDOBUSC.js
Created March 16, 2022 17:36
tampermonkey user script that saves and autofills DOB and USC details in dr plano booking
// ==UserScript==
// @name Dr Plano DOB USC
// @namespace http://tampermonkey.net/
// @version 0.2
// @description Autofill DOB and USC in Dr Plano Booking
// @author https://github.com/brett-schneider
// @include /^https?://.*drpCourseId=\d*
// @match *?drpCourseId=*
// @icon https://www.google.com/s2/favicons?sz=64&domain=tampermonkey.net
// @grant GM_getValue
https://www.verkehr.nrw/webcams/10100022103870128212.jpg
https://www.verkehr.nrw/webcams/10100253688674747061.jpg
https://www.verkehr.nrw/webcams/10100308460257231676.jpg
https://www.verkehr.nrw/webcams/10100453176019429802.jpg
https://www.verkehr.nrw/webcams/10100494175154602454.jpg
https://www.verkehr.nrw/webcams/10100597366060758617.jpg
https://www.verkehr.nrw/webcams/10100909830981984257.jpg
https://www.verkehr.nrw/webcams/10100956863457840062.jpg
https://www.verkehr.nrw/webcams/10100973958359842825.jpg
https://www.verkehr.nrw/webcams/10101043834463572886.jpg
# radiohead - ok computer
# badly drawn boy - have you fed the fish
# beastie boys - ill communication
# daft punk - discovery
# stakka bo - great blondino
# smashing pumpkins - siamese dream
# dire straits - brothers in arms
# portishead - dummy
# nick cave and the bad seeds - let love in
# depeche mode - violator
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC4TBkP/TjliBKYw8gs/gPjhum8L/U99sCBc/3mQGZzTtxM1CtwJBONDYaRLoI/QMfi+TX/ILx0uOeXzMlBwuxQNmHJciI91F9/UJ/HBjwSqzjO7ETHChNOY9jezEuPy2T3ZB2m/zRqPqn3UAVQEDtRtF5cx1KmMCvxaPLUA/PkhzffDSt6d5XCX42dB5Nn3Udg4Rm4KB0IsqpN6dfLyAOuJBDhlN0xfX7ZOi2NMtEGgAAjE7IxKgBPMWTSXkOms/E72qCM7WGwzSkYfUxbd88nnnRqgV35V/xkfJCwxzYGrYWfwbhVdy5MlP3lFJM2QjO6O13G4cngRXwR4Q2jEY8j
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDLdNnOkmtoD3+t3vAYy3Rmgy9LRXGgCvSh80EiVyiNpsJFu5IPRr9dQHlOyuUu5/DZX2qmf4nGcC//Kw5RErAeE0Dli0KZ4piAGzMcz6MijXYgxTxu22aJCmDRNKfH9gVO/THh1l2cY1ybrk1PUOfmb+dVn+3v4wQJJBbjwrIcqFVJMSrCetWLOLqtWkXQgJ4XWAIhuEAM0smgR91j6fE6/ZLEEA3kepM7V1tkwapuGPMCpHFFq4EzDLwq7JyY7hqAkHktlHz+zXubIJHt+86RlwhtfCoQQrDqInantmemzoMu/qUovrDwoPlnNjOvBFl0K+q5CnOUe3+xrFKzLMg9
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAIAQDdG4v2dzGlVNp3172dGqragjPV2ysgHoA6yKXhqdeu0jpAIzCV0m+FTlColadWxiNeIikvVfaPJ/9t/gFJajJHFsieMmQiL65pcKri4vRPrgxypFpAgcoZ5fIeGPvgbXx16s5D/urUNlPxPW8Xuh/+92qayzxog3lF4Kn1vOGysqIbUoDMblXAxDR0InlJFfwrB6Kf2MXb5pMf07cMgmIAxjiEpIv8N
@brett-schneider
brett-schneider / pscan
Last active September 29, 2021 11:04
port scanner for bash
#!/bin/bash
## helpers
dec2ip() {
local delim ip dec=$@
for e in {3..0}
do ip+=${delim}$(((dec>>(8*e))&0xFF)) && delim=.
done
printf '%s\n' "$ip"
}
@brett-schneider
brett-schneider / README.md
Created September 17, 2021 21:20 — forked from dnozay/README.md
Collection of useful stuff for interacting with gitlab.

Reset root/admin password

Lost the root/admin password? You can reset it using the command-line. Recipe adapted from gitlab issue #308.

# start the console
sudo gitlab-rails console
@brett-schneider
brett-schneider / How to connect a PS3 controller.md
Created August 23, 2021 09:50 — forked from hlung/How to connect a PS3 controller.md
How to connect PS3 controller on Mac OSX, PC

How to connect PS3 controller on Mac OSX, PC, etc.

This is how you connect PS3 controller to Mac OSX, PC, etc. when previously connected to a PS3. You will need a Mini USB cable. Overcome your laziness, get up of your chair, and go get one!

A big misconception is that keep holding PS button will reset the controller's pairing. It DOES NOT! From my testings, the controller keeps paring with the last machine it was CONNECTED VIA A USB CABLE.

Here are the steps:

@brett-schneider
brett-schneider / tmate_for_ssh.md
Last active July 25, 2021 05:44 — forked from iskolbin/tmate_for_ssh.md
Ubuntu(systemd) tmate service for ssh

The motivation is: reverse ssh to remote computer, the only thing needed is that the remote is connected to the Internet.

  1. On 18.04 or older remote, get tmate, put it in /usr/local/bin (20.04 is 2.4.0 but has issues /w -F [tmate-io/tmate#204]):
curl -L https://github.com/tmate-io/tmate/releases/download/2.4.0/tmate-2.4.0-static-linux-amd64.tar.xz|tar xJv
sudo mv tmate-2.4.0-static-linux-amd/tmate /usr/local/bin
  1. Put public keys in ~/.ssh/authorized_keys