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 <greg.davill@gmail.com>
# 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 April 3, 2024 14:49
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

@Informatic
Informatic / domain.xml
Last active April 7, 2024 23:20
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 June 19, 2023 10:03
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 .
pi@goes16:~ $ ./benchmark
AGC (block size=131072)
Time spent in work(): 3.994s
Time per block: 1844784ns
Samples per second: 71.050M
Costas (block size=131072)
Time spent in work(): 3.998s
Time per block: 6500052ns
Samples per second: 20.165M
FIR (N=31, block size=131072)