Skip to content

Instantly share code, notes, and snippets.

View racerxdl's full-sized avatar
🔒
Invincible for those who don't have an screwdriver.

Lucas Teske racerxdl

🔒
Invincible for those who don't have an screwdriver.
View GitHub Profile
@D1360-64RC14
D1360-64RC14 / mosaic.sh
Last active April 14, 2022 16:33
Script responsável por fazer o Download de todas as imagens de radar recentes do SIMEPAR e criar um gif com as mesmas
#!/bin/bash
download_image() {
# 1 -> Download image name
# 2 -> Output path
REF=http://www.simepar.br/
URL=https://lb01.simepar.br/riak/pgw-radar/$1
curl --silent --referer $REF --output $2 $URL
@gregdavill
gregdavill / asc_2_kicad.py
Created January 10, 2022 06:37
A simple python script to extract tracks/vias from a PADS ASCII file
# MIT License
# Copyright (c) 2022 Greg Davill <[email protected]>
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
@lcgamboa
lcgamboa / freecad_3dToSvg.py
Last active April 18, 2022 00:44
Dirt freecad macro python script to convert all kicad 3dmodels in svg outlines to edit and use in pcbdraw
"""
dirt freecad macro python script to convert all 3dmodels in svg outlines to edit and use in pcbdraw
Copyright (c) : 2020 Luis Claudio Gambôa Lopes
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
# IDA (disassembler) and Hex-Rays (decompiler) plugin for Apple AMX
#
# WIP research. (This was edited to add more info after someone posted it to
# Hacker News. Click "Revisions" to see full changes.)
#
# Copyright (c) 2020 dougallj
# Based on Python port of VMX intrinsics plugin:
# Copyright (c) 2019 w4kfu - Synacktiv
@satmandu
satmandu / build_arm64_rpi_userland.sh
Last active July 22, 2023 23:37
Generate an arm64 rpi userland for use on ubuntu/arm64.
#!/bin/bash -x
workdir="${HOME}/workdir"
[[ ! -d "$workdir" ]] && ( mkdir -p "$workdir" || exit 1)
[[ ! -d "$workdir"/tmp ]] && ( mkdir -p "$workdir"/tmp || exit 1)
[[ ! -d "$workdir"/output ]] && ( mkdir -p "$workdir"/output || exit 1)
echo "workdir is ${workdir}"
tmpdir=$(mktemp -d deb_XXXX -p "$workdir"/tmp)
deb_temp=${tmpdir}/deb
extract_tmp=${tmpdir}/extract
@artizirk
artizirk / gnupg_scdaemon.md
Last active November 6, 2024 01:15
OpenPGP SSH access with Yubikey and GnuPG

NB: This document describles a 'Old-School' way of using Yubikey with SSH

Modern OpenSSH has native support for FIDO Authentication. Its much simpler and should also be more stable with less moving parts. OpenSSH also now has support for signing arbitary files witch can be used as replacement of gnupg. Git also supports signing commits/tags with ssh keys.

Pros of FIDO

  • Simpler stack / less moving parts
  • Works directly with ssh, ssh-add and ssh-keygen on most computers
  • Simpler
  • Private key can never leave the FIDO device

Cons of FIDO

@MakiseKurisu
MakiseKurisu / pmxcfs.sh
Last active October 20, 2024 21:30
Mount pmxcfs
mkdir ./mnt
mount /dev/pve/root ./mnt
cd mnt
mount -t proc proc proc/
mount -t sysfs sys sys/
mount -o bind /dev dev/
cd ..
chroot ./mnt ./bin/bash
pmxcfs
/bin/nano /etc/pve/nodes/{node name}/qemu-server/100.conf
@Informatic
Informatic / domain.xml
Last active August 23, 2024 08:39
How to use Windows 10 OEM license in libvirt VM (<smbios mode='host' /> does not work as Windows seems to verify UUID; apparmor/security configuration changes may be needed)
<domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
<!-- ... -->
<qemu:commandline>
<qemu:arg value='-acpitable'/>
<qemu:arg value='file=/some/path/slic.bin'/>
<qemu:arg value='-acpitable'/>
<qemu:arg value='file=/some/path/msdm.bin'/>
<qemu:arg value='-smbios'/>
<qemu:arg value='file=/some/path/smbios_type_0.bin'/>
<qemu:arg value='-smbios'/>
@superseb
superseb / cleanup.sh
Last active August 13, 2024 07:31
Cleanup host added as custom to Rancher 2.0
#!/bin/sh
# OUTDATED: please refer to the link below for the latest version:
# https://github.com/rancherlabs/support-tools/blob/master/extended-rancher-2-cleanup/extended-cleanup-rancher2.sh
docker rm -f $(docker ps -qa)
docker volume rm $(docker volume ls -q)
cleanupdirs="/var/lib/etcd /etc/kubernetes /etc/cni /opt/cni /var/lib/cni /var/run/calico /opt/rke"
for dir in $cleanupdirs; do
echo "Removing $dir"
rm -rf $dir
done
@popey
popey / lddtostage
Last active October 31, 2019 23:58
Determine libraries needed by a binary and output in format for snapcraft.yaml
#!/bin/bash
TMPDIR=$(mktemp -d)
LDD=$TMPDIR/LDD
PACKAGES=$TMPDIR/PACKAGES
ldd $1 | awk -F ' ' '{print $3}' | sed '/^$/d' | sed '/^(/d' | grep -v '^not' > $LDD
while read p; do
echo -n .