Skip to content

Instantly share code, notes, and snippets.

@Heipry
Heipry / atajos-VSCode.md
Last active April 19, 2024 00:35
Atajos globales y personalizados de VSCode para teclado uk y es

Vscode Atajos

  • Mover linea - Alt + ↑ / ↓
  • Copiar linea - Shift + Alt + ↑ / ↓
  • Seleccionar siguiente aparición - Ctrl + D
  • Seleccionar todas las apariciones - Ctrl + Shift + L
  • Crear múltiples cursores - Ctrl + Alt+ ↑ / ↓
  • Selección multiple - Alt + Click
  • Mover bloque - Seleccionar . Alt + ↑ / ↓
  • Copiar bloque - Seleccionar . Shift + Alt + ↑ / ↓
@brson
brson / gist:9dec4195a88066fa42e6
Last active April 19, 2024 00:34
A Rust Syntax Guide

A Guide to Rust Syntax

A very brief guide to Rust syntax. It assumes you are already familiar with programming concepts.

This was written in 2014. It is not a good reference for Rust today, though the content is still correct.

cheats.rs looks like a good alternative.

Assert macro

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
@ednisley
ednisley / Kicad-to-HAL.py
Created April 1, 2021 14:56
Python source code and Kicad libary: convert Kicad schematic into LinuxCNC HAL configuration file
# Parse Kicad schematic netlist into a LinuxCNC HAL configuration file
#
# Ed Nisley - KE4ZNU
# 2021-04
import argparse
from pathlib import Path
import sys
from lxml import etree
@reluce
reluce / prepare_ubuntu_template.sh
Last active April 19, 2024 00:31
Prepare Ubuntu 22.04 Cloud Image and Template for Proxmox
# All commands will be executed on a Proxmox host
sudo apt update -y && sudo apt install libguestfs-tools -y
wget https://cloud-images.ubuntu.com/jammy/current/jammy-server-cloudimg-amd64.img
# Install qemu-guest-agent on the image. Additional packages can be specified by separating with a comma.
sudo virt-customize -a jammy-server-cloudimg-amd64.img --install qemu-guest-agent
# Read and set root user password from file.
sudo virt-customize -a jammy-server-cloudimg-amd64.img --root-password file:password_root.txt
# Create an additional user.
sudo virt-customize -a jammy-server-cloudimg-amd64.img --run-command "useradd -m -s /bin/bash myuser"
# Set password for that user.
@ednisley
ednisley / LinuxCNC Test Schematic.sch
Created March 24, 2021 13:02
Sample schematic, HAL file, INI file for use with Kicad-to-HAL program
EESchema Schematic File Version 4
EELAYER 30 0
EELAYER END
$Descr USLetter 11000 8500
encoding utf-8
Sheet 1 1
Title "Kicad-to-HAL Demo Schematic"
Date "2021-03-23"
Rev ""
Comp "Ed Nisley - KE4ZNU"
@andyyou
andyyou / gist:3052671
Created July 5, 2012 09:46
C# Controls abbreviation
btn Button chk CheckBox ckl CheckedListBox
cmb ComboBox dtp DateTimePicker lbl Label
llb LinkLabel lst ListBox lvw ListView
mtx MaskedTextBox cdr MonthCalendar icn NotifyIcon
nud NumeircUpDown pic PictureBox prg ProgressBar
rdo RadioButton rtx RichTextBox txt TextBox
tip ToolTip tvw TreeView wbs WebBrowser
容器
flp FlowLayoutPanel grp GroupBox pnl Panel
@yinzara
yinzara / github_bitbucket_multiple_ssh_keys.md
Last active April 19, 2024 00:22
Managing SSH keys and repo cloning using multiple accounts on GitHub and BitBucket

Why Multiple SSH keys?

There are numerous reasons you may need to use multiple SSH keys for accessing GitHub and BitBucket

You may use the same computer for work and personal development and need to separate your work.

When acting as a consultant, it is common to have multiple GitHub and/or BitBucket accounts depending on which client you may be working for.

You may have different projects you're working on where you would like to segregate your access.

@chockenberry
chockenberry / ContentView.swift
Created April 18, 2024 21:21
Observable with backing store
//
// ContentView.swift
// ObservableTester
//
// Created by Craig Hockenberry on 4/18/24.
//
import SwiftUI
class BackingStore {
@jpsim
jpsim / JAZMusician.h
Created July 7, 2014 09:25
SourceKit Playground
//
// JAZMusician.h
// JazzyApp
//
#import <Foundation/Foundation.h>
/**
JAZMusician models, you guessed it... Jazz Musicians!
From Ellington to Marsalis, this class has you covered.