Skip to content

Instantly share code, notes, and snippets.

View ststeiger's full-sized avatar
😎
Back from holidays

Stefan Steiger ststeiger

😎
Back from holidays
  • Switzerland
View GitHub Profile
@ststeiger
ststeiger / terminal.txt
Created September 11, 2023 20:45 — forked from joulgs/terminal.txt
How install libssl1.1 on ubuntu 22.04
wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.0g-2ubuntu4_amd64.deb
sudo dpkg -i libssl1.1_1.1.0g-2ubuntu4_amd64.deb
@ststeiger
ststeiger / offline_mdn_docs.md
Last active April 30, 2024 10:53 — forked from zed-dz/offline_mdn_docs.md
Offline MDN Docs
@ststeiger
ststeiger / facebook_warning.html
Created July 23, 2019 08:32 — forked from tosbourn/facebook_warning.html
How to recreate Facebook's console warning
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
</head>
<body>
<script type="text/javascript">
const warningTitleCSS = 'color:red; font-size:60px; font-weight: bold; -webkit-text-stroke: 1px black;';
const warningDescCSS = 'font-size: 18px;';
@ststeiger
ststeiger / FileAsyncCopy
Created May 12, 2019 12:04 — forked from szunyog/FileAsyncCopy
Async file copy c#
// Minimal async file copy using background worker
public class FileAsyncCopy
{
private string _source;
private string _target;
BackgroundWorker _worker;
public FileAsyncCopy(string source, string target)
{
if (!File.Exists(source))
@ststeiger
ststeiger / updateNpm.bat
Last active April 8, 2022 20:46 — forked from johnmcase/updateNpm.bat
Update npm on windows
REM see https://github.com/coreybutler/nvm-windows/issues/300
@echo off
SETLOCAL EnableDelayedExpansion
if [%1] == [] (
echo Pass in the version you would like to install, or "latest" to install the latest npm version.
) else (
set wanted_version=%1
@ststeiger
ststeiger / tls.conf
Created November 12, 2018 10:31 — forked from pascalandy/tls.conf
My Ghost blog, NGiNX TLS configuration | X25519 & secp384r1 | RSA & ECDSA
# RSA
ssl_certificate /path/fullchain.pem;
ssl_certificate_key /path/privkey.pem;
# ECDSA
ssl_certificate /path/0001_chain.pem;
ssl_certificate_key /path/itchy.nl.ec.key;
ssl_dhparam /path/dhparam4096.pem;
@ststeiger
ststeiger / MITM_SSL.cs
Created October 31, 2018 08:53 — forked from sinmygit/MITM_SSL.cs
POC - SSL MITM in C# - Updates to add SAN for self-Signed Certs
using System;
using System.Net;
using System.Net.Security;
using System.Net.Sockets;
using System.Text;
using System.Security.Cryptography.X509Certificates;
using CERTENROLLLib;
public class Program
@ststeiger
ststeiger / RSAKeys.cs
Created October 25, 2018 11:29 — forked from therightstuff/RSAKeys.cs
Import and export RSA Keys between C# and PEM format using BouncyCastle
using Org.BouncyCastle.Crypto;
using Org.BouncyCastle.Crypto.Parameters;
using Org.BouncyCastle.OpenSsl;
using Org.BouncyCastle.Security;
using System;
using System.IO;
using System.Security.Cryptography;
namespace MyProject.Data.Encryption
{

Cryptographic Best Practices

Putting cryptographic primitives together is a lot like putting a jigsaw puzzle together, where all the pieces are cut exactly the same way, but there is only one correct solution. Thankfully, there are some projects out there that are working hard to make sure developers are getting it right.

The following advice comes from years of research from leading security researchers, developers, and cryptographers. This Gist was [forked from Thomas Ptacek's Gist][1] to be more readable. Additions have been added from

@ststeiger
ststeiger / mov2webp.sh
Created June 18, 2018 15:08 — forked from dreampiggy/mov2webp.sh
ffmpeg MOV to Animated WebP
ffmpeg -i input.mov -vcodec libwebp -lossless 1 -q:60 -preset default -loop 0 -an -vsync 0 output.webp