Skip to content

Instantly share code, notes, and snippets.

View Rotzbua's full-sized avatar

Rotzbua Rotzbua

View GitHub Profile
@jauderho
jauderho / gist:6b7d42030e264a135450ecc0ba521bd8
Last active April 20, 2024 18:46
HOWTO: Upgrade Raspberry Pi OS from Bullseye to Bookworm
### WARNING: READ CAREFULLY BEFORE ATTEMPTING ###
#
# Officially, this is not recommended. YMMV
# https://www.raspberrypi.com/news/bookworm-the-new-version-of-raspberry-pi-os/
#
# This mostly works if you are on 64bit. You are on your own if you are on 32bit or mixed 64/32bit
#
# Credit to anfractuosity and fgimenezm for figuring out additional details for kernels
#
@SwitHak
SwitHak / 20211210-TLP-WHITE_LOG4J.md
Last active April 26, 2024 07:30
BlueTeam CheatSheet * Log4Shell* | Last updated: 2021-12-20 2238 UTC

Security Advisories / Bulletins / vendors Responses linked to Log4Shell (CVE-2021-44228)

Errors, typos, something to say ?

  • If you want to add a link, comment or send it to me
  • Feel free to report any mistake directly below in the comment or in DM on Twitter @SwitHak

Other great resources

  • Royce Williams list sorted by vendors responses Royce List
  • Very detailed list NCSC-NL
  • The list maintained by U.S. Cybersecurity and Infrastructure Security Agency: CISA List
@anatolebeuzon
anatolebeuzon / 20auto-upgrades
Last active March 24, 2024 08:21
Unattended-upgrades config for Raspberry Pi running Raspbian
APT::Periodic::Update-Package-Lists "1";
APT::Periodic::Download-Upgradeable-Packages "1";
APT::Periodic::AutocleanInterval "3";
APT::Periodic::Verbose "1";
APT::Periodic::Unattended-Upgrade "1";
@letientai299
letientai299 / mermaid-pandoc-guide.md
Last active April 12, 2024 15:06
Render PDF from markdown that using mermaid

Render PDF from Markdonw that using mermaid

You will need:

sudo apt install pandoc -y
@webpapaya
webpapaya / deploy-changelog.sh
Last active July 17, 2020 03:59
Travis CHANGELOG.md generator
#!/bin/bash
if [ "$TRAVIS_PULL_REQUEST" != "false" -o "$TRAVIS_BRANCH" != "$CHANGELOG_BRANCH" ]; then
echo "This commit was made against the $TRAVIS_BRANCH and not $CHANGELOG_BRANCH! Changelog not updated!"
exit 0
fi
gem install rack -v 1.6.4
gem install github_changelog_generator
@thomasfr
thomasfr / iptables.sh
Last active April 13, 2024 01:59
iptable rules to allow outgoing DNS lookups, outgoing icmp (ping) requests, outgoing connections to configured package servers, outgoing connections to all ips on port 22, all incoming connections to port 22, 80 and 443 and everything on localhost
#!/bin/bash
IPT="/sbin/iptables"
# Server IP
SERVER_IP="$(ip addr show eth0 | grep 'inet ' | cut -f2 | awk '{ print $2}')"
# Your DNS servers you use: cat /etc/resolv.conf
DNS_SERVER="8.8.4.4 8.8.8.8"
# Allow connections to this package servers
@nick-mok
nick-mok / AnObj.php
Last active January 2, 2020 19:06
This is a revision of George Mihailhoff's PHP Anonymous Object Class. I stumbled upon this class as I was looking for a way to attach functions to properties in a stdClass. This is not directly possible as there is no __call function inbuilt. And I found this code on a stackoverflow post that George had answered. However the implementation didn'…
<?php
class AnObj
{
protected $methods = array();
protected $properties = array();
public function __construct(array $options)
{
@douglasduteil
douglasduteil / .travis.yml
Last active February 22, 2021 13:27 — forked from lukewpatterson/gist:4242707
Here is how I allow Git SSH authentication in Travis CI. I'm using it to connect Travis to my repo organization AngularUI. This trick is a fork. The goal is to encode the RSA private deploy key in the .travis.yml as "-secure: xxxxx.....".
---
language: node_js
node_js:
- '0.10'
branches:
only:
- master
before_script: .travis/before_script.sh
script: echo -e " >>> Do something... \"grunt\" for example\n"
after_success: .travis/after_success.sh
@jexchan
jexchan / multiple_ssh_setting.md
Created April 10, 2012 15:00
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "your_email@youremail.com"