Skip to content

Instantly share code, notes, and snippets.

View aminyuddin's full-sized avatar

Amin Yuddin aminyuddin

  • Kuala Lumpur
View GitHub Profile
[profile abc-automation]
region = ap-southeast-1
role_arn = arn:aws:iam::123456789012:role/OrganizationAccountAccessRole
source_profile = abc-master
@aminyuddin
aminyuddin / wildfly.txt
Created February 5, 2020 11:24
HTTP management API
curl --digest -L -D - http://localhost:9990/management --header "Content-Type: application/json"-d '{"operation":"read-attribute","name":"server-state","json.pretty":1}' -u root:password
@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 / application.properties
Created February 5, 2020 01:45
Automatic Property Expansion Using Maven - You can automatically expand properties from the Maven project by using resource filtering. If you use the spring-boot-starter-parent, you can then refer to your Maven ‘project properties’ with @..@ placeholders
app.version=@project.version@
app.name=@project.name@
app.description=@project.description@
Repo file : /etc/yum.repos.d/nginx.repo
[nginx]
name=nginx repo
baseurl=http://nginx.org/packages/mainline/rhel/7/$basearch/
gpgcheck=0
enabled=1
Command :
yum -y install nginx ; service nginx start ; chkconfig nginx on
@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 / wsl.sh
Created December 10, 2019 07:33
Windows time zone configuration not reflected into WSL
sudo dpkg-reconfigure tzdata
@aminyuddin
aminyuddin / .gitlab-ci.yml
Last active December 10, 2019 07:36
.gitlab-ci.yml for katalon
run_katalon_test_suite:
tags:
- shell
script:
- katalon -noSplash -runMode=console -projectPath=$CI_PROJECT_DIR/"Project.prj" -reportFolder="Reports" -reportFileName="report" -retry=0 -testSuitePath="Test Suites/Test_Activity" -browserType="Chrome (headless)"
@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 / tar.sh
Last active November 16, 2018 13:06
Simple script to archive file from different directory into same directory omitting parent directory
#!/bin/bash
echo "Pre-registration"
arg=""
for file in /dir/anything/*/*/*; do
echo $file
arg="$arg -C $(dirname $file) $(basename $file)"
done
#tar -cvzf $arg
echo "$arg"