Skip to content

Instantly share code, notes, and snippets.

View jmcabandara's full-sized avatar
🎯
Focusing

Chaminda Bandara jmcabandara

🎯
Focusing
View GitHub Profile
@Burning-Chai
Burning-Chai / InstallJBossonCentOS7.md
Last active September 5, 2019 10:01
How to install JBOSS on CentOS7
$ sudo rpm -ihv jdk-8u91-linux-x64.rpm
$ java -version
java version "1.8.0_91"
Java(TM) SE Runtime Environment (build 1.8.0_91-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.91-b14, mixed mode)

$ javac -version
javac 1.8.0_91
@guiliredu
guiliredu / facebook-page-invite.js
Last active May 2, 2025 06:04
Facebook - Script to auto invite people who liked a page post do like the page
var buttons;
buttons = document.getElementsByClassName('_42ft');
for (var i = 0; i < buttons.length; i++) {
if(buttons[i].getAttribute('ajaxify') != null){
if(buttons[i].getAttribute('ajaxify').indexOf('invite') != -1){
buttons[i].click();
}
}
}
@jmcabandara
jmcabandara / TestJSON.java
Created September 28, 2015 06:56 — forked from madan712/TestJSON.java
Java program to Convert JSONObject to JSON String and vice versa
import org.json.simple.JSONObject;
import org.json.simple.parser.JSONParser;
import org.json.simple.parser.ParseException;
public class TestJSON {
public static void main(String[] args) {
JSONObject jObject = new JSONObject();
@FrancesCoronel
FrancesCoronel / sampleREADME.md
Last active May 15, 2025 16:19
A sample README for all your GitHub projects.

Repository Title Goes Here

Frances Coronel

INSERT GRAPHIC HERE (include hyperlink in image)

Subtitle or Short Description Goes Here

ideally one sentence >

@dickolsson
dickolsson / backup.sh
Last active August 16, 2022 17:13
Simple backup script that will backup package list, files and databases.
#!/bin/sh
#
# A simple Arch Linux backup script.
#
# Example config that targets external mount, keeping backups for a week and
# mirror the backups to local and external disks:
#
# $ cat /etc/backuprc
# backup_target=/mnt/data01/myhost
# backup_days_kept=7
@maxivak
maxivak / readme.md
Last active February 19, 2025 23:23
Integrating Gem/Engine and Main Rails App
@chrishantha
chrishantha / CompareEclipseProfile.java
Last active April 21, 2017 04:11
CompareEclipseProfile
import java.io.File;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
import java.util.Set;
import java.util.TreeSet;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
@marlonbernardes
marlonbernardes / run-jar-as-a-service.md
Last active October 18, 2021 16:12
How to make a jar file run on startup
  1. Create the start and stop scripts of your application.
  • Example:

myapp-start.sh

#!/bin/bash
cd /home/ubuntu/myapp/
java -jar myapp.jar --server.port=8888 &
# Disable SELinux
echo 0 > /selinux/enforce
perl -pi -e 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config
# Install required packages
yum install pdksh compat-libstdc++-33 compat-libstdc++-33.i686 libaio libaio.i686 \
pam-1.1.1-17.el6.x86_64 pam-1.1.1-17.el6.i686 nfs-utils openssh-clients \
numactl
# Update Kernel Parameters (http://ibm.co/1czEKb4)
@atd-schubert
atd-schubert / Gitlab-with-unbundled-nginx.md
Last active February 26, 2024 12:14
gitlab with own nginx

How to setup gitlab without embedded nginx

Install via omnibus-package

install the normal way:

wget https://downloads-packages.s3.amazonaws.com/ubuntu-14.04/gitlab_7.7.2-omnibus.5.4.2.ci-1_amd64.deb & > /dev/null

sudo apt-get update
sudo apt-get upgrade