Skip to content

Instantly share code, notes, and snippets.

MIFARE Classic

Here are the steps to follow in order to read your cards. Your goal is to find as many keys as possible. The keys unlock sections of your card for the Flipper to read them - you must have a card. Once you read enough sections, you can use an emulated or cloned card at the original card reader to unlock it (sometimes even without finding all of the keys!).

Reading the card

Steps:

  1. Dictionary attack: Try to scan your MIFARE Classic card with NFC -> Read. It will try a dictionary attack of default keys to unlock your card, as well as any keys you may have found through other methods. Do not interrupt the dictionary attack, it may take a while! If it finds 32/32 keys (or 80/80) with 16/16 sectors (or 40/40), congratulations and proceed to "Emulation". If not, continue to step 2.
  2. Mfkey32 attack (): If you have only a few keys found or no keys found, you can get mor
#!/bin/bash -e
# Usage ./k8s-service-account-kubeconfig.sh ( namespace ) ( service account name )
TEMPDIR=$( mktemp -d )
trap "{ rm -rf $TEMPDIR ; exit 255; }" EXIT
SA_SECRET=$( kubectl get sa -n $1 $2 -o jsonpath='{.secrets[0].name}' )
@MartinCura
MartinCura / ManyToManyReactAdminComponents.tsx
Last active April 24, 2024 19:36
react-admin (w/ hasura backend) components for many-to-many (M2M) relationship management
/**
* I couldn't find online any way of managing entities with a M2M relationship in react-admin with hasura backend,
* so here are mine.
* Example of what you can do: to the Edit view of your Movie resource, add DeletableRelatedResourceList
* to list and delete associated actors, and M2MRelatedResourceSelectInput to add new associated actors
* (with an intermediary table movie_actors).
*
* Done with react-admin@3.19.0
*/
Команды в Git Bash консоли
clear — Очистить консоль
Навигация
pwd — Показать текущий каталог
ls - Показать файлы в данной папке, кроме скрытых
ls -f — Показать файлы в данной папке, включая и скрытые
cd c:/ — Перейти в конкретный каталог
cd - — Вернуться назад
cd .. — Выйти на 1 уровень вверх
@tsbarnes
tsbarnes / gruvbox-dark.theme
Last active April 24, 2024 19:29
Gruvbox color scheme for XFCE4 terminal, place it in /usr/share/xfce4/terminal/colorschemes
[Scheme]
Name=Gruvbox (dark)
ColorForeground=#f2f2e5e5bcbc
ColorBackground=#323230302f2f
ColorCursor=#d65bc4cd8ca1
ColorPalette=#323230302f2f;#cccc24241d1d;#989897971a1a;#d7d799992121;#454585858888;#b1b162628686;#68689d9d6a6a;#f2f2e5e5bcbc;#1d1d20202121;#fbfb49493434;#b8b8bbbb2626;#fafabdbd2f2f;#8383a5a59898;#d3d386869b9b;#8e8ec0c07c7c;#fffff1f1c6c6
@knutster
knutster / connect.md
Created April 24, 2024 19:29
Connect a shell to a docker container via websocket hosted in Docker Swarm via Portainer

Connect a shell to a docker container via websocket hosted in Docker Swarm via Portainer

Dependencies

  • jq
  • curl
  • websocat

Define the following environment variables:

@webarchitect609
webarchitect609 / terminal.sh
Last active April 24, 2024 19:25
Git: disable GPG signing for current repo only.
# Write local
git config --local commit.gpgsign false
# Read local (if never set, can be an empty value)
git config --local commit.gpgsign
@clee
clee / voron_sensorless.md
Last active April 24, 2024 19:25
how to sensorless XY on Vorons

Setting Up and Calibrating Sensorless XY Homing

When using the TMC2130 / TMC2209 / TMC2660 / TMC5160 drivers, the StallGuard feature makes it possible to set up sensorless homing on the X and Y axes for CoreXY machines. The Klipper project has a page with documentation and recommendations on getting it working.

Following are some more detailed instructions and suggestions to supplement the Klipper documentation specifically for Vorons.

Hardware Setup

@arshednabeel
arshednabeel / vicsek.py
Last active April 24, 2024 19:25
A minimal implementation of the Vicsek model in ~50 lines of code
import numpy as np
from tqdm import trange
def get_neighbour_matrix(x, L, R):
dx = np.subtract.outer(x[:, 0], x[:, 0])
dy = np.subtract.outer(x[:, 1], x[:, 1])
dx[dx > (L / 2) ** 2] -= (L / 2) ** 2
dy[dy > (L / 2) ** 2] -= (L / 2) ** 2
pair_dist = dx ** 2 + dy ** 2
@Yousha
Yousha / .gitattributes
Created February 13, 2019 18:24
.gitattributes for .Net developers.
* text=auto
###### Git
.gitattributes text
.gitignore text
.gitconfig text
.gitmodules text
##### Windows
*.bat text eol=crlf