Thanks to visit codestin.com
Credit goes to gist.github.com

Skip to content

Instantly share code, notes, and snippets.

@menski
menski / jenkins-decrypt.py
Created April 7, 2015 20:51
Decrypt jenkins password hashes
#!/usr/bin/env python3
# original: https://raw.githubusercontent.com/tweksteen/jenkins-decrypt/master/decrypt.py
# requires: pycrypto
import re
import sys
import base64
@albertbori
albertbori / Installation.md
Last active September 18, 2025 11:09
Automatically disable Wifi when an Ethernet connection (cable) is plugged in on a Mac

Overview

This is a bash script that will automatically turn your wifi off if you connect your computer to an ethernet connection and turn wifi back on when you unplug your ethernet cable/adapter. If you decide to turn wifi on for whatever reason, it will remember that choice. This was improvised from this mac hint to work with Yosemite, and without hard-coding the adapter names. It's supposed to support growl, but I didn't check that part. I did, however, add OSX notification center support. Feel free to fork and fix any issues you encounter.

Most the credit for these changes go to Dave Holland.

Requirements

  • Mac OSX 10+
  • Administrator privileges
@deanmlittle
deanmlittle / fib.md
Last active September 18, 2025 11:08
fib.so teardown

Deconstructing fib.so, a minimal sBPF program

For this deconstruction, we will be researching fib.so, a hand-rolled sBPF assembly program that calculates the fibonacci number based upon a u8 input.

Structure of an sBPF program

The structure of an sBPF program has 4 sections:

1. ELF Header

The starting point of the file, describing the overall file format, target environment, and offsets for program and section headers.

2. Program Headers

Define the memory segments and their attributes (readable, writable, executable) for runtime execution.

@tallesairan
tallesairan / README.md
Created February 7, 2023 20:21
How to unpack .wpress archive files created by the All-in-one-Wp-Migration Wordpress plugin

How to unpack .wpress archive files created by the All-in-one-Wp-Migration Wordpress plugin

Recently I needed to download some files from a Wordpress installation where the client only gave me access to the admin dashboard. Fortunately the All-in-One WP Migration plugin was already installed, so I could take a quick backup of the whole site by downloading the installed plugins, theme and database. To my surprise downloading the backup from the All-in-One WP Migration plugin only gave me a single compressed migration.wpress file that any unpack tool refused to extract. A little web search brought me to a five year old tool called Wpress-Extractor but the provided binaries for MacOS refused to work because the package was already too old.

So I decided to rewrite this little helpful tool in Node.js to make it cross-platform compatible for Windows, MacOS and Linux.

Ok here it is: A simple 2-step tutorial how to extract a file with the .wpress extension on your computer:

  1. Step
@netfantom-spb
netfantom-spb / WSL.md
Last active September 18, 2025 11:04
WSL

WSL list

Get-ChildItem "HKCU:\Software\Microsoft\Windows\CurrentVersion\Lxss" -Recurse

Move WSL to another drive/PC

wsl --export Ubuntu .\Ubuntu\ext4.vhdx --vhd
wsl --unregister Ubuntu
wsl --import-in-place Ubuntu .\Ubuntu\ext4.vhdx
@otaviog
otaviog / WSL-import-export.md
Created July 22, 2024 14:00
WSL import/export commands
@Dovias
Dovias / terminal-default-application-admin.md
Last active September 18, 2025 11:02
Set Windows 10/11 default terminal for admin privileges

Set Windows 10/11 default terminal for admin and user-level privileges

This tutorial allows you to manually set version of microsoft/terminal to be used as default terminal with and without administrative privileges on Microsoft Windows 10 or 11.

Note

This tutorial is for educational purposes only. I am not responsible for any damages that may have caused this. By attempting to follow this guide, you are on your own risk.

Instructions.

  1. Download unpackaged version of Microsoft Terminal from GitHub. You can find latest working version for this guide here..

[!NOTE]

@ircfspace
ircfspace / worker.js
Created September 18, 2025 08:05
Simple GitHub Raw Proxy Worker
export default {
async fetch(request) {
const url = new URL(request.url);
const path = url.pathname.replace(/^\/+/, "");
const parts = path.split("/");
if (parts.length < 4) {
return new Response("Usage: /owner/repo/branch/path/to/file.ext", { status: 400 });
}
const [owner, repo, branch, ...filePathParts] = parts;
const filePath = filePathParts.join("/");
@fatbobman
fatbobman / dynamicHeightSheet.swift
Created April 5, 2024 06:59
a dynamic sheet demo
import SwiftUI
struct ContentView: View {
@State var show = false
@State var height: CGFloat = 250
var body: some View {
List {
Button("Pop Sheet") {
height = 250
show.toggle()
@posener
posener / go-shebang-story.md
Last active September 18, 2025 10:59
Story: Writing Scripts with Go

Story: Writing Scripts with Go

This is a story about how I tried to use Go for scripting. In this story, I’ll discuss the need for a Go script, how we would expect it to behave and the possible implementations; During the discussion I’ll deep dive to scripts, shells, and shebangs. Finally, we’ll discuss solutions that will make Go scripts work.

Why Go is good for scripting?

While python and bash are popular scripting languages, C, C++ and Java are not used for scripts at all, and some languages are somewhere in between.