Skip to content

Instantly share code, notes, and snippets.

@salewski
salewski / dot-gitconfig-snippet-add-alias-ads-push-all-from-upstream.ini
Last active May 6, 2020 16:38
Provides two new git aliases: 'ads-push-all-from-upstream' and 'ads-push-all-from-upstream-force'
# -*- conf-unix -*-
# snippet for your ~/.gitconfig file
# provides two new git aliases:
# * ads-push-all-from-upstream
# * ads-push-all-from-upstream-force
# ...
[alias]
# ...
# Downloads and unpacks (in subdirs of the current directory) all of the
# Debian source packages associated with the *-dbgsym and *-dbg packages whose
# symbols are referenced by the specified program ('/usr/bin/someprogram' in
# the snippet below). Takes pains to ensure the downloaded source packages are
# at the exact same version number as the corresponding *-dbgsym/*-dbg
# packages.
#
# Assumes you are in the directory beneath which you would like the sources to
# be unpacked (by 'apt-get source'). Each unique package will have a separate
# subdirectory. We are not clever about avoiding duplicates, but 'apt-get source'
@kevinoid
kevinoid / .bashrc
Created July 31, 2019 16:31
GnuPG pinentry script for terminal or graphical interface based on $PINENTRY_USER_DATA.
# ~/.bashrc: executed by bash(1) for non-login shells.
# If file exists (likely) copy fragment below into existing script:
# If stdin is a terminal
if [ -t 0 ]; then
# Set GPG_TTY so gpg-agent knows where to prompt. See gpg-agent(1)
export GPG_TTY="$(tty)"
# Set PINENTRY_USER_DATA so pinentry-auto knows to present a text UI.
export PINENTRY_USER_DATA=USE_TTY=1
@mehaase
mehaase / sshtranger_things.py
Last active August 26, 2024 10:28
SSHtranger Things Exploit POC
'''
Title: SSHtranger Things
Author: Mark E. Haase <[email protected]>
Homepage: https://www.hyperiongray.com
Date: 2019-01-17
CVE: CVE-2019-6111, CVE-2019-6110
Advisory: https://sintonen.fi/advisories/scp-client-multiple-vulnerabilities.txt
Tested on: Ubuntu 18.04.1 LTS, OpenSSH client 7.6p1
We have nicknamed this "SSHtranger Things" because the bug is so old it could be
@restump
restump / cli.sh
Last active January 15, 2019 21:55
Register AMI with SRIOV and ENA
aws ec2 register-image --ena-support --sriov-net-support simple --virtualization-type hvm --name ami-base-centos --block-device-mappings '[{"DeviceName":"/dev/sda1","Ebs":{"SnapshotId":"snap-05168016823a3fc9f"}}]' --root-device-name /dev/sda1 --architecture x86_64 --profile rdc-com-production
aws ec2 create-tags --tags Key=OS,Value=CentOS Key=Application,Value=base --resources ami-423a593d --profile rdc-com-production
@rofl0r
rofl0r / init.c
Created August 6, 2013 21:15
minimal init daemon by rich felker, author of musl libc
#define _XOPEN_SOURCE 700
#include <signal.h>
#include <unistd.h>
int main()
{
sigset_t set;
int status;
if (getpid() != 1) return 1;