Skip to content

Instantly share code, notes, and snippets.

@sleyzerzon
sleyzerzon / java_keytool_cheat_sheet.md
Created September 7, 2023 00:32 — forked from Hakky54/java_keytool_cheat_sheet.md
Keytool Cheat Sheet - Some list of keytool commands for create, check and verify your keys

Keytool CheatSheet 🔐

Some history

This cheat sheet came into life when I started working on a tutorial of setting up one way tls and two way tls, which can be found here: GitHub - Mutual TLS SSL

Creation and importing

Generate a Java keystore and key pair

keytool -genkeypair -keyalg RSA -keysize 2048 -keystore keystore.jks -alias server -validity 3650
@sleyzerzon
sleyzerzon / curl.md
Created December 16, 2017 15:16 — forked from subfuzion/curl.md
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

$ mvn clean package
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building classifier 1.0.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[I
@sleyzerzon
sleyzerzon / JcspTest.java
Created September 19, 2016 23:48 — forked from mike-neck/JcspTest.java
JCSP - Communicating Sequential Processes for Java
package org.mikeneck.jcsp;
import org.jcsp.lang.*;
import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* @author : mike
* @since : 12/07/07
@sleyzerzon
sleyzerzon / HotSpot JVM intrinsics
Created September 13, 2016 11:36 — forked from apangin/HotSpot JVM intrinsics
HotSpot JVM intrinsics
_hashCode java/lang/Object.hashCode()I
_getClass java/lang/Object.getClass()Ljava/lang/Class;
_clone java/lang/Object.clone()Ljava/lang/Object;
_dabs java/lang/Math.abs(D)D
_dsin java/lang/Math.sin(D)D
_dcos java/lang/Math.cos(D)D
_dtan java/lang/Math.tan(D)D
_datan2 java/lang/Math.atan2(DD)D
_dsqrt java/lang/Math.sqrt(D)D
_dlog java/lang/Math.log(D)D
@sleyzerzon
sleyzerzon / atom_clojure_setup.md
Created August 21, 2016 01:31 — forked from jasongilman/atom_clojure_setup.md
This describes how I setup Atom for Clojure Development.

Atom Clojure Setup

This describes how I setup Atom for an ideal Clojure development workflow. This fixes indentation on newlines, handles parentheses, etc. The keybinding settings for enter (in keymap.cson) are important to get proper newlines with indentation at the right level. There are other helpers in init.coffee and keymap.cson that are useful for cutting, copying, pasting, deleting, and indenting Lisp expressions.

Install Atom

Download Atom

The Atom documentation is excellent. It's highly worth reading the flight manual.

@sleyzerzon
sleyzerzon / coding-exercise.md
Created July 29, 2016 14:36 — forked from DalekBaldwin/coding-exercise.md
Droit Coding Exercise

Socrates is a man. All men are mortal. Therefore, Socrates is mortal.

You probably know that a general inference engine may carry out this sort of reasoning by combining the knowledge encapsulated in a rule like Human(x) -> Mortal(x) with the knowledge of the fact Human(Socrates) to infer Mortal(Socrates).

But in this exercise, rules refer only to concrete propositions given as simple unitary variables, not quantified expressions. The conjunction of all the premises appearing on the left hand side of a rule implies that the single conclusion appearing on the right hand side can be derived. We can represent rules of this form in EDN like so: [[:socrates-is-a-man :all-men-are-mortal] :-> :socrates-is-mortal].

Given this set of two rules:

[[:a :b] :-> :c] [[:c :d :e] :-&gt; :f

@sleyzerzon
sleyzerzon / gist:27e2ddaab8460de6f141
Created October 2, 2015 14:17 — forked from lucasfais/gist:1207002
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt
@sleyzerzon
sleyzerzon / README.md
Created October 2, 2015 14:16 — forked from hofmannsven/README.md
My simply Git Cheatsheet
Latency Comparison Numbers
--------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns
Send 1K bytes over 1 Gbps network 10,000 ns 0.01 ms
Read 4K randomly from SSD* 150,000 ns 0.15 ms