Skip to content

Instantly share code, notes, and snippets.

View vladak's full-sized avatar

Vladimir Kotal vladak

  • Europe
View GitHub Profile
@anecdata
anecdata / safemode.py
Last active May 29, 2024 08:30
CircuitPython 8 safemode.py
# SPDX-FileCopyrightText: 2023 anecdata
#
# SPDX-License-Identifier: MIT
import json
import microcontroller
import supervisor
from ⚙️ import *
@Kranzes
Kranzes / guide.md
Last active November 14, 2024 08:26
SSH Resident Key Guide

Initial checks

Start by checking that there aren't any previous ssh keys inside the FIDO2 authenticator of your YubiKey. You can check if they exist by running the command below:

nix shell nixpkgs#yubikey-manager -c ykman fido credentials list

If the command above outputs a string mentioning "ssh" or "openssh", then you have already got a key generated and store on your YubiKey.

Evaluating additional authentication factors

Before generating a new ssh key to store on your YubiKey you must consider which additional required authentication factors you want to use. Below you can see a table with the available factors and their corresponding command:

@victornpb
victornpb / Fixing MacMini 2012 Platform Controller Heatsink gap.md
Created July 28, 2022 16:17
Fixing MacMini 2012 Platform Controller Heatsink gap

Fixing MacMini 2012 Platform Controller Heatsink gap

63K5OtKJ2rQ2OIHR

Intel HM77 (SLJ8C) platform controller hub

I measured the gap to be just a little bit higher than 0.15mm (I couldn’t fit the 0.2 filler gauge). So I tried to shim it with something, aluminum foil is definitely not enough you would need more than 10 layers. So the closest thing I had was a Coke can, I cut a square piece and remove the paint and inner coating with steel wool, trim it to 14x14mm.

it turned out to be 0.1mm, (don’t use 2 layers it will be too thick). add thermal paste to both sides. So the thermal paste only has to fill a gap about 0.025 on each side instead of a massive 0.2 gap.

@aaronsteers
aaronsteers / github-cicd-workflow.yml
Last active April 2, 2023 20:28
Fully-Managed Python Package using Poetry
# Instructions:
#
# 1. Save this file as `{root}/.github/workflows/cicd.yml`.
# 2. Set the `PYPI_USER` and `PYPI_PASS` secrets in your GitHub CI config.
# 3. Update the `PYPACKAGE_NAME` declaration to the name you want to use in PyPi.
#
# Public Gist: https://gist.github.com/aaronsteers/f3eec4db94d3db1de78b76b3318e9e33
name: Python CI/CD
env:
@fay59
fay59 / Quirks of C.md
Last active September 4, 2024 23:07
Quirks of C

Here's a list of mildly interesting things about the C language that I learned mostly by consuming Clang's ASTs. Although surprises are getting sparser, I might continue to update this document over time.

There are many more mildly interesting features of C++, but the language is literally known for being weird, whereas C is usually considered smaller and simpler, so this is (almost) only about C.

1. Combined type and variable/field declaration, inside a struct scope [https://godbolt.org/g/Rh94Go]

struct foo {
   struct bar {
 int x;
@tstellanova
tstellanova / setup_pigpiod.md
Last active April 26, 2024 09:23
Install pigpiod on Raspberry Pi 3 (RPi3) running raspbian buster

Install pigpio

If you're working with the rpi3's gpio, the pigpio library can be very handy.

sudo apt-get update
sudo apt-get install pigpio 

If you also want to access pigpio from python, install: sudo apt-get install python-pigpio python3-pigpio

Setup pigpiod service to run at boot

- translate all the slide/notes up to and excluding sem API (Vlada)
- translate all the remaining slides for sem API (Jan)
- move System V semaphore API to the appendix, do not translate (Jan)
- change System V sem API in the Syllabus to POSIX sem API (Vlada)
@joyrexus
joyrexus / README.md
Last active August 6, 2024 16:07
collapsible markdown

collapsible markdown?

CLICK ME

yes, even hidden code blocks!

print("hello world!")
@manojpandey
manojpandey / gotchas.md
Last active August 31, 2021 14:52
Attack of Pythons

Attack of Pythons

Among computer programmers, a “gotcha” has become a term for a feature of a programming language that is likely to play tricks on you to display behavior that is different than what you expect.

Just as a fly or a mosquito can “bite” you, we say that a gotcha can “bite” you. So, let's proceed to examine some of Python's gotchas !

alt text


@evantoli
evantoli / GitConfigHttpProxy.md
Last active November 14, 2024 06:03
Configure Git to use a proxy

Configure Git to use a proxy

In Brief

You may need to configure a proxy server if you're having trouble cloning or fetching from a remote repository or getting an error like unable to access '...' Couldn't resolve host '...'.

Consider something like: