Skip to content

Instantly share code, notes, and snippets.

View alexanderk23's full-sized avatar

Alexander Kovalenko alexanderk23

View GitHub Profile
@alexanderk23
alexanderk23 / example.php
Created December 8, 2016 14:15
FindFace API example (PHP)
<?php
define('DATEFMT', 'Y-m-d\TH:i:s.u');
/* Bounded box from "Common objects" */
class BBox {
var $x1, $y1, $x2, $y2;
function __construct($x1, $y1, $x2, $y2) {
$this->x1 = $x1;
$this->y1 = $y1;
$this->x2 = $x2;
--- ext/openssl/ossl.c
+++ ext/openssl/ossl.c
@@ -1022,6 +1022,7 @@
*/
/* CRYPTO_malloc_init(); */
/* ENGINE_load_builtin_engines(); */
+ OPENSSL_config(NULL); /* Makes Ruby respect system OpenSSL config */
OpenSSL_add_ssl_algorithms();
OpenSSL_add_all_algorithms();
ERR_load_crypto_strings();
--- ext/openssl/ossl.c
+++ ext/openssl/ossl.c
@@ -1062,6 +1062,7 @@
*/
/* CRYPTO_malloc_init(); */
/* ENGINE_load_builtin_engines(); */
+ OPENSSL_config(NULL); /* Makes Ruby respect system OpenSSL config */
OpenSSL_add_ssl_algorithms();
OpenSSL_add_all_algorithms();
ERR_load_crypto_strings();
macro emptytrd_with_boot _trdname
DISP 0
.boot db $00, $01, $66, $00, $f9, $c0, $30, $0e, $00, $00, $57
db $5d, $00, $3a, $ea, $3a, $f7, $22, $62, $6f, $6f, $74
db $20, $20, $20, $20, $22, $0d, $f3, $cd, $6b, $0d, $09
db $e5, $01, $05, $09, $cd, $13, $3d, $e1, $54, $5d, $01
db $08, $00, $35, $28, $27, $34, $28, $29, $e5, $09, $7e
db $e1, $fe, $42, $20, $1c, $e5, $c5, $d5, $11, $4d, $5d
db $1a, $ed, $a1, $20, $04, $13, $ea, $7d, $5d, $d1, $c1
db $e1, $28, $08, $11, $4d, $5d, $ed, $b0, $c3, $03, $3d
@alexanderk23
alexanderk23 / heapq.asm
Last active June 3, 2021 14:34
heapq.asm
; Binheap priority queue
; Based on 6502 code by MagerValp
; https://github.com/MagerValp/AsmHeap
; 255 items max, 3 bytes wasted
struct HEAPQ
align 256
tree ds 255, 0
size db 0
@alexanderk23
alexanderk23 / tap2wav.py
Created November 6, 2021 09:16
Convert TAP to WAV
#!/usr/bin/env python
import argparse
import struct
import wave
SECONDS_PAUSE = 1.5
SECONDS_PILOT_HEADER = 3
SECONDS_PILOT_DATA = 1.5