Skip to content

Instantly share code, notes, and snippets.

View microo8's full-sized avatar

Vlαdo Magyar microo8

View GitHub Profile
@logrusorgru
logrusorgru / imgrsz.go
Created November 3, 2016 18:50
Golang resize png images using different interpolations
package main
import (
"image"
"image/png"
"log"
"os"
"time"
"golang.org/x/image/draw"
@denji
denji / golang-tls.md
Last active May 18, 2024 16:33 — forked from spikebike/client.go
Simple Golang HTTPS/TLS Examples

Moved to git repository: https://github.com/denji/golang-tls

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)
@bryfry
bryfry / gzip.go
Last active August 28, 2023 09:23
Idiomatic golang net/http gzip transparent compression (works with Alice)
package main
import (
"compress/gzip"
"io"
"net/http"
"strings"
)
// Gzip Compression
@microo8
microo8 / pca.h
Created November 13, 2012 13:10
PCA procedure in C using GSL
#include <assert.h>
#include <gsl/gsl_matrix.h>
#include <gsl/gsl_statistics.h>
#include <gsl/gsl_eigen.h>
#include <gsl/gsl_blas.h>
gsl_matrix* pca(const gsl_matrix* data, unsigned int L)
{
/*
@param data - matrix of data vectors, MxN matrix, each column is a data vector, M - dimension, N - data vector count
@boppreh
boppreh / balloontip.py
Created November 2, 2012 11:35 — forked from wontoncc/balloontip.py
Balloon tip module, Python, using win32gui. Display a notification in the tray bar and quits after 10 seconds.
# -- coding: utf-8 --
from win32api import *
from win32gui import *
import win32con
import sys, os
import struct
import time
class WindowsBalloonTip: