Skip to content

Instantly share code, notes, and snippets.

@aaqibch
aaqibch / selfsigned.py
Created August 11, 2022 14:33 — forked from bloodearnest/selfsigned.py
Create a self-signed x509 certificate with python cryptography library
# Copyright 2018 Simon Davy
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
@aaqibch
aaqibch / CMakeLists.txt
Created August 11, 2022 14:29 — forked from nathan-osman/CMakeLists.txt
Generates a self-signed x509 certificate using OpenSSL.
# A simple CMake script for building the application.
cmake_minimum_required(VERSION 2.8)
project(create-x509)
# Our only dependency is OpenSSL
find_package(OpenSSL REQUIRED)
include_directories(${OPENSSL_INCLUDE_DIR})
add_executable(create-x509 create-x509.cpp)
@aaqibch
aaqibch / convert_to_bt656.py
Created July 25, 2019 14:53 — forked from mxwell/convert_to_bt656.py
Script to convert a picture into ITU-R BT.656 frame.
#! /usr/bin/python
###############################################################################
# Script converts an arbitrary picture into a single frame,
# compliant with ITU-R BT.656-5, see:
#
# http://www.itu.int/dms_pubrec/itu-r/rec/bt/R-REC-BT.656-5-200712-I!!PDF-E.pdf
#
# Tested on Ubuntu 12.04, Python 2.7.3
###############################################################################

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

@aaqibch
aaqibch / Gaussian Blur
Created April 17, 2017 20:16 — forked from omaraflak/main.cpp
Image convolution in C++ + Gaussian blur
#include <iostream>
#include <vector>
#include <assert.h>
#include <cmath>
#include <png++/png.hpp>
using namespace std;
typedef vector<double> Array;
typedef vector<Array> Matrix;
@aaqibch
aaqibch / Gaussian Blur
Created April 17, 2017 20:15 — forked from omaraflak/main.cpp
Image convolution in C++ + Gaussian blur
#include <iostream>
#include <vector>
#include <assert.h>
#include <cmath>
#include <png++/png.hpp>
using namespace std;
typedef vector<double> Array;
typedef vector<Array> Matrix;