Skip to content

Instantly share code, notes, and snippets.

View franzramadhan's full-sized avatar
🪐
Blessed is the mind too small for doubt

Frans Caisar Ramadhan franzramadhan

🪐
Blessed is the mind too small for doubt
View GitHub Profile
Refreshing Terraform state in-memory prior to plan...
The refreshed state will be used to calculate this plan, but will not be
persisted to local or remote state storage.
Error running plan: 1 error(s) occurred:
* provider.proxmox: unexpected EOF
panic: runtime error: invalid memory address or nil pointer dereference
2017/06/07 16:16:57 [DEBUG] plugin: terraform-provider-proxmox: [signal SIGSEGV: segmentation violation code=0x1 addr=0x40 pc=0x97f6dd]
2017/06/07 16:16:57 [DEBUG] plugin: terraform-provider-proxmox:
@franzramadhan
franzramadhan / rsync
Last active July 18, 2017 06:51
rsync files with time attribute
find . -newermt "2017-07-16" -print0 | xargs -0 -I% rsync -avpP % root@lilinta:/var/lib/vz/ksa
@franzramadhan
franzramadhan / console-shutdown.exp
Created July 18, 2017 14:58
Custom Java Application Init Scripts
#!/usr/bin/expect
#
# Shutdown Queue jpr@2013
#
################################################################3
set timeout 20
set host [lindex $argv 0]
set port [lindex $argv 1]
@franzramadhan
franzramadhan / asa-b.config
Created May 18, 2017 08:52
ASA-B Configuration
: Saved
:
: Serial Number: JAD202409YP
: Hardware: ASA5508, 8192 MB RAM, CPU Atom C2000 series 2000 MHz, 1 CPU (8 cores)
: Written by admin2 at 14:18:01.378 UTC Thu Mar 23 2017
!
ASA Version 9.7(1)
!
hostname fwasa-c
@franzramadhan
franzramadhan / centos7_raid1.ks
Last active July 27, 2017 10:31
Demox Kickstart Installation File
#version=RHEL7
# System authorization information
auth --enableshadow --passalgo=sha512
# Use network installation
url --url="http://10.32.15.190/yum/CentOS/7.2.1511/os/x86_64/"
# Run the Setup Agent on first boot
firstboot --enable
zerombr
ignoredisk --only-use=sda,sdb
# Keyboard layouts
@franzramadhan
franzramadhan / ulimit
Last active July 31, 2017 04:41
modify ulimit centos regular user
sudo sh -c "ulimit -u 65535 && exec su $LOGNAME"
if failed
#open files ( -n)
firstwap soft nofile 8192
firstwap hard nofile 8192
#max user processes (-u)
firstwap hard nproc 65535
firstwap soft nproc 65535
@franzramadhan
franzramadhan / ntp.conf
Created August 25, 2017 15:39
enable pid for services in Centos 7
#/etc/ntp.conf
pidfile /var/run/ntp/ntp.pid
@franzramadhan
franzramadhan / scaling performance
Created September 5, 2017 09:56
change cpu freq governor
echo performance | tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor >/dev/null
@franzramadhan
franzramadhan / haproxy.cfg
Created October 4, 2017 06:14
HAProxy and Keepalived Configuration for resilient infrastructure
global
log 127.0.0.1 local2 info
chroot /var/lib/haproxy
pidfile /var/run/haproxy.pid
maxconn 1024
user haproxy
group haproxy
daemon
defaults
@franzramadhan
franzramadhan / 99-vrrp.conf
Last active October 19, 2017 03:05
Maxcale and Keepalived Configuration
# /etc/sysctl.d/99-vrrp.conf
net.ipv4.ip_nonlocal_bind = 1