Skip to content

Instantly share code, notes, and snippets.

Zachary Loeber zloeber

Block or report user

Report or block zloeber

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@zentralwerkstatt
zentralwerkstatt / instructions.md
Last active Sep 22, 2019
Install Syncthing on Linux
View instructions.md
  • Install the necessary packages:
sudo apt-get install apt-transport-https ca-certificates
curl -s https://syncthing.net/release-key.txt | sudo apt-key add -
echo "deb https://apt.syncthing.net/ syncthing stable" | sudo tee /etc/apt/sources.list.d/syncthing.list
sudo apt-get update
sudo apt-get install syncthing
sudo apt-get install git
  • Start syncthing once:
@iambkramer
iambkramer / Export-Chocolatey.ps1
Last active Aug 2, 2018 — forked from alimbada/Export-Chocolatey.ps1
Export installed Chocolatey packages as chocolatey script
View Export-Chocolatey.ps1
choco list -lo -r -y | % { $_.Split('|') | select -First 1 } | % { "choco install " + $_ + " -y" }
choco list -lo -r -y | % { $_.Split('|') | select -First 1 } | % { "choco install " + $_ + " -y" } | Out-file choco-software.txt
@ipbastola
ipbastola / clean-up-boot-partition-ubuntu.md
Last active Oct 19, 2019
Safest way to clean up boot partition - Ubuntu 14.04LTS-x64, Ubuntu 16.04LTS-x64
View clean-up-boot-partition-ubuntu.md

Safest way to clean up boot partition - Ubuntu 14.04LTS-x64, Ubuntu 16.04LTS-x64

Reference

Case I: if /boot is not 100% full and apt is working

1. Check the current kernel version

$ uname -r 
@mattifestation
mattifestation / drop_binary.bat
Created Jul 12, 2015
Drop binary data from the command line w/o needing PowerShell
View drop_binary.bat
echo -----BEGIN CERTIFICATE----- > encoded.txt
echo Just Base64 encode your binary data
echo TVoAAA== >> encoded.txt
echo -----END CERTIFICATE----- >> encoded.txt
certutil -decode encoded.txt decoded.bin
@fearthecowboy
fearthecowboy / powershell_evil.cs
Last active May 22, 2018
Snooping the unbound powershell parameters during dynamic parameter generation
View powershell_evil.cs
/// ... somewhere in your cmdlet (might need to be PSCmdlet?)
private const BindingFlags BindingFlags = System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.Static | System.Reflection.BindingFlags.Public;
// provided you have a tasty function to reflect private fields/properties
protected object TryGetProperty(object instance, string fieldName) {
// any access of a null object returns null.
if (instance == null || string.IsNullOrEmpty(fieldName)) {
return null;
}
View tmux.md

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

# remap prefix to Control + a
You can’t perform that action at this time.