Skip to content

Instantly share code, notes, and snippets.

View edores's full-sized avatar

Edward D'Ores edores

  • Toronto, Canada
View GitHub Profile
@edores
edores / java-reflect-array.java
Last active August 12, 2023 12:23
java.lang.reflect.Array vs java.util.Arrays;
// Array class vs Arrays class
// Importing both classes from resprective packages
import java.lang.reflect.Array;
import java.util.Arrays;
public class A {
public static void main(String[] args)
{
// Getting the size of the array
@edores
edores / java-override-ex.java
Last active August 12, 2023 03:06
Java Overriding Example
// Method overriding in java
class Parent {
void show() { System.out.println("Parent's show()"); }
}
class Child extends Parent {
// This method overrides show() of Parent
@Override void show()
{
@edores
edores / index.html
Created August 1, 2023 12:37 — forked from joshbuchea/index.html
HTML5 Starter
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>HTML5 Starter</title>
<link rel="icon"
href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><text y=%22.9em%22 font-size=%2290%22>🐣</text></svg>">
<!-- <link rel="stylesheet" href="styles.css"> -->
<!-- <style></style> -->
</head>
@edores
edores / cryptography-file-formats.md
Created October 5, 2022 15:26 — forked from tuansoibk/cryptography-file-formats.md
Cryptography material conversion and verification commands
  1. Introduction
  2. Standards
  3. Common combinations
  4. Conversion
  5. Verification/Inspection
  6. Tips for recognising

Introduction

It happens that there are many standards for storing cryptography materials (key, certificate, ...) and it isn't always obvious to know which standard is used by just looking at file name extension or file content. There are bunch of questions on stackoverflow asking about how to convert from PEM to PKCS#8 or PKCS#12, while many tried to answer the questions, those answers may not help because the correct answer depends on the content inside the PEM file. That is, a PEM file can contain many different things, such as an X509 certificate, a PKCS#1 or PKCS#8 private key. The worst-case scenario is that someone just store a non-PEM content in "something.pem" file.

@edores
edores / git-manual-amend.sh
Created November 21, 2020 17:39 — forked from aseure/git-manual-amend.sh
Git manual amend
git reset HEAD~1
git add D
git commit --amend -m ‘add C and D files’
git add E
git commit -m ‘add E file’
git rebase --continue