Skip to content

Instantly share code, notes, and snippets.

View sintezcs's full-sized avatar
🏠
Working from home

Alex Minakov sintezcs

🏠
Working from home
View GitHub Profile
@sintezcs
sintezcs / SSH_MACOS_SECURE_ENCLAVES.md
Created November 24, 2025 11:44 — forked from arianvp/SSH_MACOS_SECURE_ENCLAVES.md
Native Secure Enclaved backed ssh keys on MacOS

Native Secure Enclave backed ssh keys on MacOS

It turns out that MacOS Tahoe can generate and use secure-enclave backed SSH keys! This replaces projects like https://github.com/maxgoedjen/secretive

There is a shared library /usr/lib/ssh-keychain.dylib that traditionally has been used to add smartcard support to ssh by implementing PKCS11Provider interface. However since recently it also implements SecurityKeyProivder which supports loading keys directly from the secure enclave! SecurityKeyProvider is what is normally used to talk to FIDO2 devices (e.g. libfido2 can be used to talk to your Yubikey). However you can now use it to talk to your Secure Enclave instead!

### Keybase proof
I hereby claim:
* I am sintezcs on github.
* I am aminakov (https://keybase.io/aminakov) on keybase.
* I have a public key ASCq--kQrWDkQ9GrZPpfzxmZK8qMMHxqvlGbp47EjBeCaAo
To claim this, I am signing this object:
@sintezcs
sintezcs / hotel_carousel.html
Created October 3, 2018 13:34
Hotel Carousel
@sintezcs
sintezcs / hotel_room.html
Last active October 3, 2018 13:23
Hotel room snippet
<p>
<img src="https://i.imgur.com/LBkONfA.png" style="height: 165px; width: 275px; margin: -15px -15px 0;">
</p>
<p>
<span class="label label-success" style="width: 51%; position: relative; top: -10px;" role="button"><strong>p.p.p.n. € 165</strong></span>
</p>
<h2 style="margin-bottom:15px; color:rgba(86,61,124,0.8); margin-top: 2px; font-weight: bold; font-size: 16px; text-align:right;">Executive Room</h2>
<p style="padding-bottom: 10px; text-align:justify;">
With a spacious living area, these rooms are equipped to meet the needs of the modern traveller.
</p>
@sintezcs
sintezcs / tmux-cheatsheet.markdown
Created September 18, 2016 14:29 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@sintezcs
sintezcs / nav_logo.css
Last active August 29, 2016 09:16
Navigation menu logo
.dropdown-menu.menu-view {
background: #fff url('http://path_to_image.com/image.png') center top no-repeat; /* Place link to your logo image here */
background-size: contain;
padding-top: 175px; /* Should be greater or equal to logo image height */
}
@sintezcs
sintezcs / retry.py
Created August 14, 2016 19:31
Decorator for retrying function call in case of failure
import time
def retry(error_condition=lambda err: True,
retry_count=10, retry_timeout=1, progressive_timeout=True):
"""Decorator for retrying function call in case of exception
You could decorate any function or method with this if you need to
repeatedly call this method a couple of times with an increasing interval
in case of some error raised during the method call.
@sintezcs
sintezcs / rate_limit.py
Last active February 16, 2017 07:41
Rate-limiting decorator
import threading
import time
def rate_limited(max_per_second):
lock = threading.Lock()
min_interval = 1.0 / max_per_second
def decorate(func):
last_time_called = time.perf_counter()
@sintezcs
sintezcs / gist:06260463d41b81e82881
Created August 26, 2015 17:03
Install and launch IPython on Mac
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install python
pip3 install ipython[notebook]
ipython notebook
http://127.0.0.1:8888