Skip to content

Instantly share code, notes, and snippets.

OpenSSL Playground

Certificates

Print Certificate ( crt file )

openssl x509 -in stackexchangecom.crt -text -noout

Print Certificate ( pem file )

openssl x509 -in cert.pem -text -noout

Print Certificate ( cer file )

openssl x509 -inform der -in foobar.cer -noout -text

Read part of Certificate
@BurgerZ
BurgerZ / UpdateBuildVersion.ps1
Created June 24, 2020 09:54
Powershell script to Update Build & Version numbers for iOS & Android (Info.plist and AndroidManifest.xml )
$majorMinorVersion = ""
$commitCount = & git rev-list --count HEAD
Write-Output "git rev-list --count HEAD = $commitCount"
$params = @{
FilePath = ""
OS = ""
ToolsDir = ""
SolutionFolder = ""
@BurgerZ
BurgerZ / Moon.swift
Created April 27, 2020 20:04 — forked from maxhuk/Moon.swift
Extended moon phase utils
/** Extended moon phase utils
Ported from https://github.com/solarissmoke/php-moon-phase/blob/master/Solaris/MoonPhase.php
Maksym Huk 2017
*/
import Foundation
import SwiftMoment
class Moon {
@BurgerZ
BurgerZ / PreferenceFragment.java
Created February 22, 2018 08:18 — forked from cbeyls/PreferenceFragment.java
A PreferenceFragment for the Android support library. Based on the platform's code with some removed features and a basic ListView layout.It uses reflection but works with every device I've tested so far.
package android.support.v4.preference;
import java.lang.reflect.Constructor;
import java.lang.reflect.Method;
import android.annotation.SuppressLint;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.os.Build;
@BurgerZ
BurgerZ / repo-reset.md
Created January 15, 2018 16:58 — forked from heiswayi/repo-reset.md
GitHub - Delete commits history with git commands

First Method

Deleting the .git folder may cause problems in our git repository. If we want to delete all of our commits history, but keep the code in its current state, try this:

# Check out to a temporary branch:
git checkout --orphan TEMP_BRANCH

# Add all the files:
git add -A
@BurgerZ
BurgerZ / SignedJar.java
Created January 8, 2018 19:10 — forked from mmuszkow/SignedJar.java
Signed JAR
package ch.cern.test.mdm.utils;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.security.NoSuchProviderException;
import java.security.PrivateKey;
import java.security.Security;
Remove osxfuse if installed via homebrew:
> brew uninstall osxfuse
Install osxfuse binary and choose to install the MacFUSE compatibility layer:
http://sourceforge.net/projects/osxfuse/files/latest/download?source=files
Reboot (optional but recommended by osxfuse)
Install ntfs-3g via homebrew:
> brew update && brew install ntfs-3g
@BurgerZ
BurgerZ / elk.md
Created December 17, 2015 07:21 — forked from nfarrar/elk.md
Setting Up a Private Elk Server

Private ELK Server

I needed a syslog server and had been reading about ELK for the past few months. I finally decided to throw together a basic implementation in my home lab. I've recorded my notes for this process in this document & dumped the notes online at the following locations:

The implementation I built is super basic, it's just in my lab for dev purposes atm - so I didn't finish securing or building the integrations - just needed it to visualize some syslog data ATM.

@BurgerZ
BurgerZ / gist:10498d3a348630058c70
Created October 28, 2015 05:35
iTools update disable (hosts)
127.0.0.1 itools.hk
127.0.0.1 update.itools.hk
127.0.0.1 ol-cn.itools.hk
127.0.0.1 serv2.itools.hk
127.0.0.1 stat2.itools.hk
127.0.0.1 serv-cn.itools.hk
127.0.0.1 www.1taoji.com
127.0.0.1 andrv.itools.hk
127.0.0.1 dl.itools.hk
127.0.0.1 lxcdn.slooti.com