Skip to content

Instantly share code, notes, and snippets.

View aminyuddin's full-sized avatar

Amin Yuddin aminyuddin

  • Kuala Lumpur
View GitHub Profile
@aminyuddin
aminyuddin / bash_strict_mode.md
Created February 15, 2023 04:10 — forked from mohanpedala/bash_strict_mode.md
set -e, -u, -o, -x pipefail explanation
@aminyuddin
aminyuddin / EncryptSample.java
Created October 1, 2021 02:16 — forked from ozkansari/EncryptSample.java
PIN Block Creation
import javax.crypto.Cipher;
import javax.crypto.spec.SecretKeySpec;
public class EncryptSample {
private static final String KEY = "AB1C11111111111AAAAAAADDDDD11111";
private static final int PIN_LENGTH = 6;
public static void main(String[] args) throws Exception {
@aminyuddin
aminyuddin / PinblockTool.java
Created October 1, 2021 02:16 — forked from Gilmor/PinblockTool.java
Pinblock ISO 9564 format 0
package cz.monetplus.mnsp.tools.misc;
import org.apache.commons.codec.DecoderException;
import org.apache.commons.codec.binary.Hex;
import org.apache.commons.lang.StringUtils;
/**
* Tools for encoding a decoding pinblock
*
* @author Tomas Jacko <tomas.jacko [at] monetplus.cz>
@aminyuddin
aminyuddin / git-cheat-sheet.md
Created March 4, 2020 02:11 — forked from prograhammer/git-cheat-sheet.md
Git cheat sheet for some useful Git commands and command scenarios.
@aminyuddin
aminyuddin / commit_format_examples.txt
Created March 4, 2020 01:36 — forked from mutewinter/commit_format_examples.txt
Examples of my commit format.
chore: add Oyster build script
docs: explain hat wobble
feat: add beta sequence
fix: remove broken confirmation message
refactor: share logic between 4d3d3d3 and flarhgunnstow
style: convert tabs to spaces
test: ensure Tayne retains clothing
@aminyuddin
aminyuddin / README-Template.md
Created February 5, 2020 07:40 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@aminyuddin
aminyuddin / main.yml
Created January 10, 2020 07:12 — forked from rothgar/main.yml
Generate /etc/hosts with Ansible
# Idempotent way to build a /etc/hosts file with Ansible using your Ansible hosts inventory for a source.
# Will include all hosts the playbook is run on.
# Inspired from http://xmeblog.blogspot.com/2013/06/ansible-dynamicaly-update-etchosts.html
- name: "Build hosts file"
lineinfile: dest=/etc/hosts regexp='.*{{ item }}$' line="{{ hostvars[item].ansible_default_ipv4.address }} {{item}}" state=present
when: hostvars[item].ansible_default_ipv4.address is defined
with_items: groups['all']
@aminyuddin
aminyuddin / SSLPoke.java
Created October 16, 2019 08:08 — forked from 4ndrej/SSLPoke.java
Test of java SSL / keystore / cert setup. Check the comment #1 for howto.
import javax.net.ssl.SSLParameters;
import javax.net.ssl.SSLSocket;
import javax.net.ssl.SSLSocketFactory;
import java.io.*;
/** Establish a SSL connection to a host and port, writes a byte and
* prints the response. See
* http://confluence.atlassian.com/display/JIRA/Connecting+to+SSL+services
*/
public class SSLPoke {
@aminyuddin
aminyuddin / rabbitmq.txt
Created September 18, 2017 08:48 — forked from sdieunidou/rabbitmq.txt
create admin user on rabbitmq
rabbitmqctl add_user test test
rabbitmqctl set_user_tags test administrator
rabbitmqctl set_permissions -p / test ".*" ".*" ".*"
@aminyuddin
aminyuddin / mod_admin_cluster
Created December 20, 2016 11:38 — forked from highlyunavailable/mod_admin_cluster
mod_admin_cluster.erl
-module(mod_admin_cluster).
-author('highlyunavailable@gmail.com').
-behaviour(gen_mod).
-export([
join_cluster_as_master/1,
join_cluster/1,
leave_cluster/0,
leave_cluster/1,