Skip to content

Instantly share code, notes, and snippets.

View jstorm31's full-sized avatar

Jiří Zdvomka jstorm31

View GitHub Profile
@tyrcho
tyrcho / howto.md
Last active November 22, 2023 02:04
Git secret and CI
@Sorix
Sorix / KeyboardChangeFrameObserver.swift
Last active May 21, 2022 16:03
Report keyboard height changes
import UIKit
/// Observer that will fire events when keyboard frame will be changed (shown, hidden or resized)
/// - Note: Call `addKeyboardFrameChangesObserver()` on init, e.g. on `viewWillAppear`
/// and `removeKeyboardFrameChangesObserver()` on deinit, e.g. on `viewDidDisappear`
public protocol KeyboardChangeFrameObserver: class {
func willChangeKeyboardFrame(height: CGFloat, animationDuration: TimeInterval, animationOptions: UIView.AnimationOptions)
}
public extension KeyboardChangeFrameObserver {
@morishin
morishin / left-align-stack-view.png
Last active March 22, 2024 00:25
Align to Left the contents of UIStackView
left-align-stack-view.png
@ibraheem4
ibraheem4 / postgres-brew.md
Last active May 1, 2024 09:43 — forked from sgnl/postgres-brew.md
Installing Postgres via Brew (OSX)

Installing Postgres via Brew

Pre-Reqs

Brew Package Manager

In your command-line run the following commands:

  1. brew doctor
  2. brew update
@nboubakr
nboubakr / HuffmanCoding.py
Created January 1, 2015 11:35
Huffman coding implementation in Python
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Le codage de Huffman
# Théorie de l'information et du codage
# Etudiant: Boubakr NOUR <n.boubakr@gmail.com>
# Universite Djilali Liabes (UDL) de Sidi Bel Abbes
import heapq
from collections import defaultdict
@lalinsky
lalinsky / fpcmp.py
Created August 8, 2011 16:52
Very simple way to compare Chromaprint fingerprints
import chromaprint
popcnt_table_8bit = [
0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,1,2,2,3,2,3,3,4,2,3,3,4,3,4,4,5,
1,2,2,3,2,3,3,4,2,3,3,4,3,4,4,5,2,3,3,4,3,4,4,5,3,4,4,5,4,5,5,6,
1,2,2,3,2,3,3,4,2,3,3,4,3,4,4,5,2,3,3,4,3,4,4,5,3,4,4,5,4,5,5,6,
2,3,3,4,3,4,4,5,3,4,4,5,4,5,5,6,3,4,4,5,4,5,5,6,4,5,5,6,5,6,6,7,
1,2,2,3,2,3,3,4,2,3,3,4,3,4,4,5,2,3,3,4,3,4,4,5,3,4,4,5,4,5,5,6,
2,3,3,4,3,4,4,5,3,4,4,5,4,5,5,6,3,4,4,5,4,5,5,6,4,5,5,6,5,6,6,7,