Skip to content

Instantly share code, notes, and snippets.

View michaelfranzl's full-sized avatar
🖥️
Developing software

Michael Franzl michaelfranzl

🖥️
Developing software
View GitHub Profile
@fntlnz
fntlnz / self-signed-certificate-with-custom-ca.md
Last active April 19, 2024 12:30
Self Signed Certificate with Custom Root CA

Create Root CA (Done once)

Create Root Key

Attention: this is the key used to sign the certificate requests, anyone holding this can sign certificates on your behalf. So keep it in a safe place!

openssl genrsa -des3 -out rootCA.key 4096
==========================
How Software Companies Die
==========================
- Orson Scott Card
The environment that nurtures creative programmers kills management and
marketing types - and vice versa.
Programming is the Great Game. It consumes you, body and soul. When
you're caught up in it, nothing else matters. When you emerge into
@whatthewhat
whatthewhat / gist:cb6a62532a8a0984adbe
Created July 21, 2014 09:03
Find scheduled sidekiq job by id
require 'sidekiq/api'
Sidekiq::ScheduledSet.new.find_job("61374d5d51db323507376158")
@joostrijneveld
joostrijneveld / gpg2qrcodes.sh
Created May 20, 2014 19:43
Producing printable QR codes for persistent storage of GPG private keys
# Heavily depends on:
# libqrencode (fukuchi.org/works/qrencode/)
# paperkey (jabberwocky.com/software/paperkey/)
# zbar (zbar.sourceforge.net)
# Producing the QR codes:
# Split over 4 codes to ensure the data per image is not too large.
gpg --export-secret-key KEYIDGOESHERE | paperkey --output-type raw | base64 > temp
split temp -n 4 IMG
for f in IMG*; do cat $f | qrencode -o $f.png; done
@nicktoumpelis
nicktoumpelis / repo-rinse.sh
Created April 23, 2014 13:00
Cleans and resets a git repo and its submodules
git clean -xfd
git submodule foreach --recursive git clean -xfd
git reset --hard
git submodule foreach --recursive git reset --hard
git submodule update --init --recursive
@twokul
twokul / hidden-classes-in-js-and-inline-caching.md
Last active April 23, 2024 22:02
Hidden classes in JavaScript and Inline Caching

Hidden classes in JavaScript and Inline Caching

Knowing how internals work is always a good. Pretty much for everything. Cars, trains, computers, you name it. It gives you an insight on what happens under the hood. You also act/react differently based on this knowledge.

As you might have guessed, it’s also true for web development. Knowledge of CSS transitions allows you to achieve better performance and not to use JavaScript in most cases. Knowledge of V8 internals allows you to write more performant JavaScript code. So let’s talk about V8 a little.

A little about V8

V8 is a JavaScript engine built by Google. Firefox built SpiderMonkey, Opera built Carakan and Microsoft built Chakra. One very important difference between V8 and other JavaScript engines is that V8 doesn’t generate any intermediate code. It compiles JavaScr

@AntonTyutin
AntonTyutin / sendmail.sh
Last active June 9, 2022 11:37
A stub of "sendmail" command. Appends mail to file instead of send it to mail server. Depends on Perl and its "MIME::QuotedPrint" module.
#!/bin/bash
MAIL_LOG=${LOG_DIR:-/var/log}/mails.log
echo '== [' $(date +%Y-%m-%d_%H-%M-%S) '] ==' >> $MAIL_LOG
perl -MMIME::QuotedPrint -pe '$_=MIME::QuotedPrint::decode($_);' | tee -a $MAIL_LOG > /dev/null
cpanm -l local https://github.com/<user_name>/<repo_name>/tarball/<branch_name>
e.g.
cpanm -l local https://github.com/issm/p5-Amon2-Plugin-Model/tarball/master
@ascendbruce
ascendbruce / gist:7070911
Created October 20, 2013 15:13
Ruby get current file full path (absolute path)
File.expand_path(File.dirname(__FILE__))
# If you want to require some files in different directory, in ruby 1.9, you may want to use:
require_relative "../xxxlib"
@Madsy
Madsy / gist:6980061
Last active January 15, 2024 10:04
Working multi-threading two-context OpenGL example with GLFW 3.0.3 and GLEW 1.8
#include <GL/glew.h>
#include <GLFW/glfw3.h>
#include <vector>
#include <cmath>
#include <cstdio>
#include <limits>
#include <chrono>
#include <thread>
#include <mutex>