Skip to content

Instantly share code, notes, and snippets.

View brianredbeard's full-sized avatar

redbeard brianredbeard

View GitHub Profile
@Al-Azif
Al-Azif / pi-exploit-host.conf
Last active April 7, 2024 19:57
Config file for exploit host on Pi-hole
# 0. Use `crtl+h` and replace `{{HOST}}` with the IP address of a server you
# control and want to direct the traffic to. Or Just use `0.0.0.0` to block it.
#
# 1. Log into your Pi-hole device and move this file into the `/etc/dnsmasq.d/`
# directory. Feel free to rename it.
#
# 2. Run the command `pihole restartdns`
# Redirects Nintendo Landing Page Domains
address=/ctest.cdn.nintendo.net/{{HOST}}
@eladtamary
eladtamary / tag_untagged_csi_volumes.sh
Last active November 2, 2021 11:47
This script is used tag AWS volumes that were created by Kubernetes CSI external provisioner. In each execution, the script will tag all AWS volumes that are un-tagged using the tags of the attached instance. This is a workaround until it will be implemented by the external-provisioner natively. See related issue: https://github.com/kubernetes-c…
#!/usr/bin/env bash
echo "$(date) - started to tag untagged CSI volumes"
untagged_csi_volumes=$(aws --profile my-aws-profile --output json ec2 describe-volumes \
--query 'Volumes[?!not_null(Tags[?Key == `Environment`].Value)] | []')
for volume in $(echo "${untagged_csi_volumes}" | jq -r '.[] | @base64'); do
volume_id=$(echo "$volume" | base64 --decode | jq -r '.VolumeId')
@LukasWoodtli
LukasWoodtli / CMakeGraphVizOptions.cmake
Last active October 21, 2023 00:02
How to produce dependency graphs from cmake
# put this file in the top source dir (CMAKE_SOURCE_DIR)
# see: https://cmake.org/cmake/help/latest/module/CMakeGraphVizOptions.html
set(GRAPHVIZ_EXTERNAL_LIBS FALSE)
# only dependencies between libraries
set(GRAPHVIZ_EXECUTABLES FALSE)
@cyberwani
cyberwani / .htaccess
Created August 10, 2018 09:39
Block the HTTRACK using HTACCESS files
Options All -Indexes
# Ultimate htaccess Blacklist 2 from Perishable Press
# Deny domain access to spammers and other scumbags
RewriteEngine on
RewriteBase /
RewriteCond %{HTTP_USER_AGENT} ADSARobot|ah-ha|almaden|aktuelles|Anarchie|amzn_assoc|ASPSeek|ASSORT|ATHENS|Atomz|attach|attache|autoemailspider|BackWeb|Bandit|BatchFTP|bdfetch|big.brother|BlackWidow|bmclient|Boston\ Project|BravoBrian\ SpiderEngine\ MarcoPolo|Bot\ mailto:craftbot@yahoo.com|Buddy|Bullseye|bumblebee|capture|CherryPicker|ChinaClaw|CICC|clipping|Collector|Copier|Crescent|Crescent\ Internet\ ToolPak|Custo|cyberalert|DA$|Deweb|diagem|Digger|Digimarc|DIIbot|DISCo|DISCo\ Pump|DISCoFinder|Download\ Demon|Download\ Wonder|Downloader|Drip|DSurf15a|DTS.Agent|EasyDL|eCatch|ecollector|efp@gmx\.net|Email\ Extractor|EirGrabber|email|EmailCollector|EmailSiphon|EmailWolf|Express\ WebPictures|ExtractorPro|EyeNetIE|FavOrg|fastlwspider|Favorites\ Sweeper|Fetch|FEZhead|FileHound|FlashGet\ WebWasher|FlickBot|fluffy|FrontPage|GalaxyBot|Generic|Getleft|GetRight|
@ggsalas
ggsalas / kitty.conf
Last active January 10, 2023 18:34
Kitty terminal - one dark theme [~/.config/kitty/kitty.conf]
# vim:fileencoding=utf-8:ft=conf:foldmethod=marker
#: Fonts {{{
#: kitty has very powerful font management. You can configure
#: individual font faces and even specify special fonts for particular
#: characters.
# font_family Monaco
font_family Source Code Pro
@lukasnellen
lukasnellen / 00-serial-console.md
Last active February 20, 2024 15:30
kvm serial console for virtual machine

Serial console for KVM based VM and IPMI serial channel

grub and kernel console

Set in /etc/default/grub:

...
###GRUB_CMDLINE_LINUX_DEFAULT="quiet"
GRUB_CMDLINE_LINUX_DEFAULT="console=ttyS0,115200n8 console=tty1"
GRUB_CMDLINE_LINUX=""
@FergusInLondon
FergusInLondon / mpris.py
Last active September 21, 2020 04:36
Retrieve data from a Media Player in Linux, via dbus. (Uses Python)
import dbus
class MediaPlayer:
"""Recieves state from a MediaPlayer using dbus."""
player_properties = False
def __init__(self, player_name):
# Get an instance of the dbus session bus, and retrieve
# a proxy object for accessing the MediaPlayer
@ianchen06
ianchen06 / end.gcode
Last active February 23, 2022 01:38
Anet A8 start end gcode
;End GCode
M104 S0 ;extruder heater off
M140 S0 ;heated bed heater off (if you have it)
G91 ;relative positioning
G1 E-1 F300 ;retract the filament a bit before lifting the nozzle, to release some of the pressure
G1 Z+0.5 E-5 X-20 Y-20 F{travel_speed} ;move Z up a bit and retract filament even more
G28 X0 Y0 ;move X/Y to min endstops, so the head is out of the way
M84 ;steppers off
@kylemanna
kylemanna / dnsmasq.sh
Created March 15, 2017 02:35
Simple tftp server using dnsmasq
$ sudo dnsmasq -kd -p 0 -C /dev/null -u nobody --enable-tftp --tftp-root=/srv/ftp
@mario52a
mario52a / Macro_CloneConvert.FCMacro
Last active April 27, 2024 21:44
Creates a clone or copy of the object and the converted in the chosen position and size (inch, mm, m, µm...) or free. The base object is recognized in mm (FreeCAd base)
# -*- coding: utf-8 -*-
# CloneConvert.FCMacro
# Cree un clone ou une copie de l'objet ou des objets selectionne(s) et le met e l'echelle de la grandeur choisie
# utilisation : lancer CloneConvert selectionnez un objet choisissez la grandeur et cliquez sur OK
#
# Creates a clone of one copy the selected object and updates the selected size range
# use: start CloneConvert select an object choose the size and click OK
#
#OS: Windows 10 (10.0)