Skip to content

Instantly share code, notes, and snippets.

View jmcabandara's full-sized avatar
🎯
Focusing

Chaminda Bandara jmcabandara

🎯
Focusing
View GitHub Profile
@sutlxwhx
sutlxwhx / README.md
Last active March 13, 2024 14:44
Enable RDP and access to the virtual machines for your Proxmox installation

Introduction

This tuturial will help you configure network for your fresh Proxmox istallation.
Be aware that Proxmox configuration was made using this tutorial.

Installation

Backup your current /etc/network/interfaces using this command:

cp /etc/network/interfaces /etc/network/interfaces.backup
Recently, I use JMXterm to collect info about Java JVM via JMX and MBeans. Here is a short note.
- Download JMXterm
https://sourceforge.net/projects/cyclops-group/files/jmxterm/1.0.0/jmxterm-1.0.0-uber.jar/download
- Run JMXterm
java -jar jmxterm-1.0.0-uber.jar --url localhost:<jmx listen port>
- All MBeans from java.lang
$>domain java.lang
@1duo
1duo / centos.install.cmake.from.source.md
Last active April 23, 2024 15:58
Install CMake on CentOS 7.

Download CMake from: https://cmake.org/download/

wget https://cmake.org/files/v3.12/cmake-3.12.3.tar.gz

Compile from source and install

tar zxvf cmake-3.*
@PieterScheffers
PieterScheffers / install_forticlient_linux.sh
Created January 22, 2018 16:28
Install Forticlient on Linux
# install ubuntu in virtual machine
# https://ubuntuforums.org/showthread.php?t=1481300
# Get arch type of ubuntu
# i686 = 32 bit
# x86_64 = 64 bit
uname -m
# download forticlient
https://hadler.me/linux/forticlient-sslvpn-deb-packages
@William-Hill
William-Hill / install_jenkins.sh
Created October 24, 2017 23:34
Install Jenkins on CentOS 6
sudo wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins-ci.org/redhat/jenkins.repo
sudo rpm --import https://jenkins-ci.org/redhat/jenkins-ci.org.key
sudo yum install jenkins
@lgg
lgg / readme.md
Last active May 2, 2024 20:14
Keepass file format explained

Keepass file format explained

I’m currently working (I’m just at the beginning, and I’m quite slow) on a personal project that will use Keepass files (kdb and kdbx).
I tried to find some documentation about .kdb and .kdbx format, but I didn’t find anything, even in the Keepass official website. I you want to know how these file formats are structured, you must read Keepass’s source code. So I wrote this article that explains how Keepass file format are structured, maybe it will help someone.

"""
Write a program that prints the numbers from 1 to 20. But for multiples of three, print 'Fizz'
instead of the number and for the multiples of five print 'Buzz'.
For numbers which are multiples of both three and five print 'FizzBuzz'.
"""
for num in range(1,21):
string = ""
if num % 3 == 0:
string = string + "Fizz"
@chrishantha
chrishantha / apim_start.sh
Last active May 2, 2017 10:32
Test Script to run JMeter with multiple concurrent users
#!/bin/bash
export JAVA_HOME=/usr/lib/jvm/jdk1.8.0_121
if pgrep -f "carbon" > /dev/null; then
echo "Shutting down APIM"
/home/ubuntu/apim-product/wso2am-2.1.0/bin/wso2server.sh stop
sleep 30
fi
log_files=(/home/ubuntu/apim-product/wso2am-2.1.0/repository/logs/*)
if [ ${#log_files[@]} -gt 1 ]; then
@troyfontaine
troyfontaine / readme.md
Last active April 8, 2024 06:10
Resize root partition (or how to remove the default /home partition) on CentOS 7 online

Resize root partition (or how to remove the default /home partition) on CentOS 7 online

This process requires that you are able to ssh OR log in locally using the root user account and that no services be running as users out of /home on the target machine.

The examples are from a default installation with no customization-you NEED to know what you're working with for volumes/partitions to not horribly break things.

By default, CentOS 7 uses XFS for the file system and Logical Volume Manager (LVM), creating 3 partitions: /,/home and swap.

NOTE: If you want to be sure that nothing is writing to /home you can either modify the host to boot into single-user mode OR try to use the systemctl isolate runlevel1.target command to switch (not tested! should work).

#!/bin/bash
SCRIPT_VERSION=0.4.60
CHANGELOG="http://www.alsa-project.org/alsa-info.sh.changelog"
#################################################################################
#Copyright (C) 2007 Free Software Foundation.
#This program is free software; you can redistribute it and/or modify
#it under the terms of the GNU General Public License as published by