Skip to content

Instantly share code, notes, and snippets.

@thibthibaut
thibthibaut / stm32ai_downloader.sh
Last active January 3, 2022 13:37
stm32ai_downloader
#!/bin/bash -e
SW="stm32ai-linux-5.1.2.zip"
URL="aHR0cHM6Ly9zdy1jZW50ZXIuc3QuY29tL3BhY2tzL3gtY3ViZS1haS9zdG0zMmFpLWxpbnV4LTUuMS4yLnppcAo="
LIC_URL="https://www.st.com/content/ccc/resource/legal/legal_agreement/license_agreement/group0/eb/8e/f9/c1/9e/64/49/95/SLA0048/files/SLA0048.txt/jcr:content/translations/en.SLA0048.txt"
LIC_FILE="en.SLA0048.txt"
echo "==============================="
echo " Welcome to stm32ai_downloader "
echo "==============================="
@marcan
marcan / linux.sh
Last active December 1, 2023 15:18
Linux kernel initialization, translated to bash
#!/boot/bzImage
# Linux kernel userspace initialization code, translated to bash
# (Minus floppy disk handling, because seriously, it's 2017.)
# Not 100% accurate, but gives you a good idea of how kernel init works
# GPLv2, Copyright 2017 Hector Martin <marcan@marcan.st>
# Based on Linux 4.10-rc2.
# Note: pretend chroot is a builtin and affects the current process
# Note: kernel actually uses major/minor device numbers instead of device name
@y0no
y0no / mizip_calc.py
Created July 5, 2016 10:09
Mizip keys calculator
#!/usr/bin/env python
# This script is an implementation of lua code written by Iceman:
# https://github.com/iceman1001/proxmark3/blob/master/client/scripts/calc_mizip.lua
# Thanks to him!
import sys
xortable = (
('001', '09125a2589e5', 'F12C8453D821'),
('002', 'AB75C937922F', '73E799FE3241'),
@leftclickben
leftclickben / gist:322b7a3042cbe97ed2af
Last active June 7, 2023 10:58
Steps to migrate from SVN to GitLab

Steps to migrate from SVN to GitLab

This process worked for me. I take no responsibility for any damage or loss incurred as a result of following or not following these steps or, for that matter, anything else you might do or not do.

Setup

  • SVN is hosted at svn.domain.com.au.
  • SVN is accessible via http (other protocols should work).
  • GitLab is hosted at git.domain.com.au and:
@pixelhandler
pixelhandler / pre-push.sh
Last active April 8, 2024 01:04
Git pre-push hook to prevent force pushing master branch
#!/bin/sh
# Called by "git push" after it has checked the remote status,
# but before anything has been pushed.
#
# If this script exits with a non-zero status nothing will be pushed.
#
# Steps to install, from the root directory of your repo...
# 1. Copy the file into your repo at `.git/hooks/pre-push`
# 2. Set executable permissions, run `chmod +x .git/hooks/pre-push`
@ndarville
ndarville / business-models.md
Last active January 13, 2024 17:27
Business models based on the compiled list at http://news.ycombinator.com/item?id=4924647. I find the link very hard to browse, so I made a simple version in Markdown instead.

Business Models

Advertising

Models Examples
Display ads Yahoo!
Search ads Google
@westonruter
westonruter / config.diff
Created February 27, 2011 20:48
Using colordiff for my svn diff command (set in ~/.subversion/config)
@@ -28,7 +28,7 @@
### Set diff-cmd to the absolute path of your 'diff' program.
### This will override the compile-time default, which is to use
### Subversion's internal diff implementation.
-# diff-cmd = diff_program (diff, gdiff, etc.)
+diff-cmd = colordiff
### Set diff3-cmd to the absolute path of your 'diff3' program.
### This will override the compile-time default, which is to use
### Subversion's internal diff3 implementation.