Skip to content

Instantly share code, notes, and snippets.

drygdryg / iw_wpa_supplicant_static.txt
Last active February 4, 2023 03:44
Сборка статично скомпонованных беспроводных утилит для Linux ARM (Android): iw и wpa_supplicant
View iw_wpa_supplicant_static.txt
Сборка статичного iw в Alpine:
# Установка базового инструментария для сборки
apk add build-base
mkdir iw_static
cd iw_static/
mkdir prefix
tar xvf libnl-3.5.0.tar.gz
cd libnl-3.5.0/
denji /
Last active February 4, 2023 03:43 — forked from spikebike/client.go
Simple Golang HTTPS/TLS Examples

Moved to git repository:

Generate private key (.key)
# Key considerations for algorithm "RSA" ≥ 2048-bit
openssl genrsa -out server.key 2048

# Key considerations for algorithm "ECDSA" ≥ secp384r1
# List ECDSA the supported curves (openssl ecparam -list_curves)
JohnSundell / ContentViewWithCollapsableHeader.swift
Created January 30, 2023 11:39
A content view which renders a collapsable header that adapts to the current scroll position. Based on OffsetObservingScrollView from
View ContentViewWithCollapsableHeader.swift
/// View that renders scrollable content beneath a header that
/// automatically collapses when the user scrolls down.
struct ContentView<Content: View>: View {
var title: String
var headerGradient: Gradient
@ViewBuilder var content: () -> Content
private let headerHeight = (collapsed: 50.0, expanded: 150.0)
@State private var scrollOffset = CGPoint()
Helw150 /
Last active February 4, 2023 03:40
Flan T5 Parallel Usage
from transformers import AutoTokenizer, T5ForConditionalGeneration
# Model Init
n_gpu = 8
tokenizer = AutoTokenizer.from_pretrained("google/flan-t5-xxl")
model = T5ForConditionalGeneration.from_pretrained("google/flan-t5-xxl")
heads_per_gpu = len(model.encoder.block) // n_gpu
device_map = {
gpu: list(
MuhammadSaim / rarreg.key
Last active February 4, 2023 03:40
Step 1: Create a file called rarreg.key Step 2: Paste into the file the raw content of this gist Step 3: Go to Winrar install directory (by default => c:\ProgramFiles\WinRAR\ ) Step 4: Paste the rarreg.key into WinRAR directory Step 5: Enjoy
View rarreg.key
RAR registration data
Unlimited Company License
NeilsUltimateLab / Understanding UIViewController Rotation when embed in Container View
Last active February 4, 2023 03:39
Understanding UIViewController rotation when embed in Container View Controllers.
View Understanding UIViewController Rotation when embed in Container View

Understanding UIViewController Rotation


To enable the rotation of a single view controller used to display the preview of Images/Videos. It is intuitive to allow user to rotate there device and screen changes accordingly, so it feels pleasant. But to achieve this, we need to enable the (almost) all Supported Device orientations.

Ex: `Portrait`, `LandscapeLeft`, `LandscapeRight`.
tykurtz /
Last active February 4, 2023 03:39
Grokking the coding interview equivalent leetcode problems


I liked the way Grokking the coding interview organized problems into learnable patterns. However, the course is expensive and the majority of the time the problems are copy-pasted from leetcode. As the explanations on leetcode are usually just as good, the course really boils down to being a glorified curated list of leetcode problems.

So below I made a list of leetcode problems that are as close to grokking problems as possible.

Pattern: Sliding Window

View websockets.xml
<?xml version="1.0" encoding="UTF-8"?>
<!-- websockets.xml -->
ekzhang / Scanner.ipynb
Created January 31, 2023 23:21
Scanning sheet music for fun and profit
View Scanner.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.