Skip to content

Instantly share code, notes, and snippets.

View ragecryx's full-sized avatar

George Koutsikos ragecryx

  • Larisa, Greece
View GitHub Profile
@ragecryx
ragecryx / ssl-certs.md
Created December 13, 2023 11:16 — forked from Eng-Fouad/ssl-certs.md
Generate self-signed PKCS#12 SSL certificate and export its keys using Java keytool and openssl.

Steps to generate self-signed PKCS#12 SSL certificate and export its keys:

1- Create PKCS#12 keystore (.p12 or .pfx file)

keytool -genkeypair -keystore myKeystore.p12 -storetype PKCS12 -storepass MY_PASSWORD -alias KEYSTORE_ENTRY -keyalg RSA -keysize 2048 -validity 99999 -dname "CN=My SSL Certificate, OU=My Team, O=My Company, L=My City, ST=My State, C=SA" -ext san=dns:mydomain.com,dns:localhost,ip:127.0.0.1
  • myKeystore.p12 = keystore filename. It can with .pfx extension as well.
  • MY_PASSWORD = password used for the keystore and the private key as well.
  • CN = commonName, it will be shown as certiciate name in certificates list.
  • OU = organizationUnit, department name for example.
@ragecryx
ragecryx / octal_x86.txt
Created October 24, 2023 10:40 — forked from seanjensengrey/octal_x86.txt
x86 is an octal machine
# source:http://reocities.com/SiliconValley/heights/7052/opcode.txt
From: mark@omnifest.uwm.edu (Mark Hopkins)
Newsgroups: alt.lang.asm
Subject: A Summary of the 80486 Opcodes and Instructions
(1) The 80x86 is an Octal Machine
This is a follow-up and revision of an article posted in alt.lang.asm on
7-5-92 concerning the 80x86 instruction encoding.
The only proper way to understand 80x86 coding is to realize that ALL 80x86
@ragecryx
ragecryx / delete_git_submodule.md
Created May 9, 2021 09:42 — forked from myusuf3/delete_git_submodule.md
How effectively delete a git submodule.

To remove a submodule you need to:

  • Delete the relevant section from the .gitmodules file.
  • Stage the .gitmodules changes git add .gitmodules
  • Delete the relevant section from .git/config.
  • Run git rm --cached path_to_submodule (no trailing slash).
  • Run rm -rf .git/modules/path_to_submodule (no trailing slash).
  • Commit git commit -m "Removed submodule "
  • Delete the now untracked submodule files rm -rf path_to_submodule
@ragecryx
ragecryx / a2dp.py
Created August 8, 2020 22:20 — forked from pylover/a2dp.py
Fixing bluetooth stereo headphone/headset problem in ubuntu 16.04, 16.10 and also debian jessie, with bluez5.
#! /usr/bin/env python3.5
"""
Fixing bluetooth stereo headphone/headset problem in ubuntu 16.04 and also debian jessie, with bluez5.
Workaround for bug: https://bugs.launchpad.net/ubuntu/+source/indicator-sound/+bug/1577197
Run it with python3.5 or higher after pairing/connecting the bluetooth stereo headphone.
This will be only fixes the bluez5 problem mentioned above .
@ragecryx
ragecryx / lib_foo.cpp
Created December 28, 2019 16:02
Premake4 - Sample Project
#include "./foo.h"
int foo(int x) {
return 10+x;
}
@ragecryx
ragecryx / antd_ordering_filter.py
Last active July 22, 2019 07:57
AntDesign Table x Django-Filters -- Ascend/Descend parameters support
class AntCompatibleOrderingFilter(filters.OrderingFilter):
def __init__(self, *args, **kwargs):
super(AntCompatibleOrderingFilter, self).__init__(*args, **kwargs)
def build_choices(self, fields, labels):
"""
Adds support for {field}-ascend and {field}-descend choices
"""
ascending = [
(f"{param}-ascend", labels.get(field, _(pretty_name(param))))
#!/bin/bash
function FCXXPlay() {
clear
fgMauve="\e[35m"
bgMauve="\e[45m"
fgGray="\e[30m"
bgRed="\e[41m"
colorReset="\e[0m"
// build!g++ -std=c++11 -g -Wall -o bin_serialization bin_serialization.cpp
// run!./bin_serialization
#include <cstdio>
#include <cstdlib>
#include <cassert>
#include <string>
#include <type_traits>
#include <sys/stat.h>