Skip to content

Instantly share code, notes, and snippets.

Disable Device Enrollment Notification on Mac.md

Restart the Mac in Recovery Mode by holding Comment-R during restart

Open Terminal in the recovery screen and type

csrutil disable
@matzegebbe
matzegebbe / clean_docker_nexus.sh
Last active May 3, 2024 20:07
Nexus Repository Manager keep the last X docker images delete all other
#!/bin/bash
REPO_URL="https://repository.xxx.net/repository/"
USER="admin"
PASSWORD="datpassword"
BUCKET="portal-docker"
KEEP_IMAGES=10
IMAGES=$(curl --silent -X GET -H 'Accept: application/vnd.docker.distribution.manifest.v2+json' -u ${USER}:${PASSWORD} "${REPO_URL}${BUCKET}/v2/_catalog" | jq .repositories | jq -r '.[]' )
@coaxial
coaxial / README.md
Last active May 3, 2024 20:06
unpinning SSL certs on Android apps with Frida to inspect network traffic with mitmproxy

Most of the time, applications won't pin the certificate. Running mitmproxy and passing all Android traffic through it is as simple as adb connect <IP> && adb shell settings put global http_proxy <mitmproxy host>:<mitmproxy port> (or use Android's UI)

Some applications, however, pin the certificate and will refuse to do any network calls if using mitmproxy.

Luckily, Frida is here!

This assumes Android x86 is running in a VM, that you are a developer in Android (tap the build version enough times), adb debugging is enabled, and that android tools are installed on the host.

  • start mitmproxy on host
  • visit mitm.it on the target (after setting the proxy) and install the spoofed cert
@jl2
jl2 / mkhelix.py
Created May 15, 2012 19:31
Python script using CATIA's COM interface to create a product structure containing 200 cubes arranged in a helix.
#!/usr/bin/env python3
import sys
import array
import math
import random
import os.path
import win32com.client
def get_catia():
# Source: https://gist.github.com/2dad051fe41bd2bbcf94eda74386ce49
#############################################
# KEDA: Kubernetes Event-Driven Autoscaling #
# https://youtu.be/3lcaawKAv6s #
#############################################
# Additional Info:
# - KEDA: https://keda.sh
# - Robusta: https://robusta.dev
@chabala
chabala / using-google-takeout.md
Last active May 3, 2024 20:05
Merge and extract tgz files from Google Takeout

Recently found some clowny gist was the top result for 'google takeout multiple tgz', where it was using two bash scripts to extract all the tgz files and then merge them together. Don't do that. Use brace expansion, cat the TGZs, and extract:

$ cat takeout-20201023T123551Z-{001..011}.tgz | tar xzivf -

You don't even need to use brace expansion. Globbing will order the files numerically:

$ cat takeout-20201023T123551Z-*.tgz | tar xzivf -
@ProcessEight
ProcessEight / automated-refactoring.md
Last active May 3, 2024 20:05
Discussion of automated refactoring processes to bring legacy codebases up to date
@zdebra
zdebra / throttled_transport.go
Created June 15, 2021 14:48
NewThrottledTransport wraps transportWrap with a rate limitter, improvement of https://gist.github.com/MelchiSalins/27c11566184116ec1629a0726e0f9af5 since it allows use of *http.Client
package main
import (
"net/http"
"time"
"golang.org/x/time/rate"
)
// ThrottledTransport Rate Limited HTTP Client
@pesterhazy
pesterhazy / building-sync-systems.md
Last active May 3, 2024 20:03
Building an offline realtime sync engine

So you want to write a sync system for a web app with offline and realtime support? Good luck. You might find the following resources useful.

Overview articles

@FradSer
FradSer / iterm2_switch_automatic.md
Last active May 3, 2024 19:58
Switch iTerm2 color preset automatic base on macOS dark mode.

The latest beta (3.5) includes separate color settings for light & dark mode. Toggling dark mode automatically switches colors.

Vist iTerm2 homepage or use brew install iterm2-beta to download the beta. Thanks @stefanwascoding.


  1. Add switch_automatic.py to ~/Library/ApplicationSupport/iTerm2/Scripts/AutoLaunch with: