Skip to content

Instantly share code, notes, and snippets.

View Alekseyyy's full-sized avatar
👩‍💻
fucking irate

Aleksey Alekseyyy

👩‍💻
fucking irate
View GitHub Profile
@heiswayi
heiswayi / repo-reset.md
Created February 5, 2017 01:32
GitHub - Delete commits history with git commands

First Method

Deleting the .git folder may cause problems in our git repository. If we want to delete all of our commits history, but keep the code in its current state, try this:

# Check out to a temporary branch:
git checkout --orphan TEMP_BRANCH

# Add all the files:
git add -A
@borzacchiello
borzacchiello / DecompilerExporter.java
Last active September 23, 2024 21:05
Ghidra script to export C pseudo-code on multiple files, including defined types
/* ###
* IP: GHIDRA
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@viovanov
viovanov / web-server-one-line.ps1
Created August 26, 2015 21:10
one liner for a powershell server
$l = New-Object System.Net.HttpListener ; $l.Prefixes.Add("http://+:8080/"); $l.Start(); while ($l.IsListening) { $c = $l.GetContext() ; $q = $c.Request; Write-Output (date); $r = $c.Response ; $m = [System.Text.ASCIIEncoding]::ASCII.GetBytes(((gci -path env:*) | Out-String)); $r.ContentLength64 = $m.Length ; $r.OutputStream.Write($m, 0, $m.Length) ; $r.OutputStream.Dispose(); }