Skip to content

Instantly share code, notes, and snippets.

View rsrini7's full-sized avatar
😃
Happy

Srinivasan Ragothaman rsrini7

😃
Happy
View GitHub Profile
@rsrini7
rsrini7 / cxf-https.xml
Created January 28, 2017 09:00 — forked from bulain/cxf-https.xml
CXF configuration using SSL/HTTPS with tomcat
#generate server and client keystore
keytool -genkeypair -alias server -keyalg RSA -dname "CN=Server,OU=Development,O=Test,L=Shanghai,S=SH,C=CN" -keystore server.keystore
keytool -genkeypair -alias client -keyalg RSA -dname "CN=Client,OU=Development,O=Test,L=Shanghai,S=SH,C=CN" -keystore client.keystore
keytool -list -keystore server.keystore
#copy server certificate into client.keystore
keytool -exportcert -alias server -file server-pub.cer -keystore server.keystore
keytool -importcert -alias server -file server-pub.cer -keystore client.keystore
keytool -list -keystore client.keystore
@rsrini7
rsrini7 / ssl-generation.sh
Created January 28, 2017 08:55 — forked from Yuri-M-Dias/ssl-generation.sh
Generating full SSL for Tomcat/Jetty using Java Keytool.
#!/bin/bash
# Generates a SSL certificate, java-ready with the hardcoded ips and name.
# Change varibale names to suit your need, you can do JAVA_HOME=$JAVA_HOME too.
JAVA_HOME=/usr/lib/jvm/java-8-oracle
CERT_NAME="yurimdias"
STOREPASS="changeit"
KEYSTORE=$JAVA_HOME/jre/lib/security/cacerts
CERTIFICATE_PATH=./$(echo $CERT_NAME)
@rsrini7
rsrini7 / HC-SR04 Ultrasonic Sensor
Created December 19, 2016 18:53 — forked from VincentK16/HC-SR04 Ultrasonic Sensor
This is a simple coding that display the distance of the obstacle to the sensor. When the sensor is approaching the obstacle, the buzzer will sound at a higher rate.
#include <NewPing.h>
#define TRIGGER_PIN 12 // Arduino pin tied to trigger pin on the ultrasonic sensor.
#define ECHO_PIN 11 // Arduino pin tied to echo pin on the ultrasonic sensor.
#define MAX_DISTANCE 200 // Maximum distance we want to ping for (in centimeters). Maximum sensor distance is rated at 400-500cm.
NewPing sonar(TRIGGER_PIN, ECHO_PIN, MAX_DISTANCE); // NewPing setup of pins and maximum distance.
void setup() {
Serial.begin(115200); // Open serial monitor at 115200 baud to see ping results.
@rsrini7
rsrini7 / README.md
Created August 11, 2016 09:00 — forked from sumitpuri/README.md
Webcam captures image and tweets it to Twitter account

Webcam is connected to Raspberry Pi. This flow is written on Raspberry Pi. It captures an image every 3 hours and tweets it to your Twitter account.

#Create bitbucket branch

##Create local branch

$ git checkout -b sync
Switched to a new branch 'sync'
$ git branch
  master
* sync
@rsrini7
rsrini7 / ubuntu_ppa_cheatsheet.md
Created June 1, 2016 06:18 — forked from pfigue/ubuntu_ppa_cheatsheet.md
Ubuntu PPA cheatsheet

Ubuntu PPA cheatsheet

Installing a new PPA

With this command:

sudo add-apt-repository ppa:<ppa_name>

which needs an extra software package:

  • On Ubuntu >=14.04: sudo apt-get install software-properties-common
@rsrini7
rsrini7 / list_ppa.sh
Created June 1, 2016 06:16 — forked from ashwin/list_ppa.sh
List PPA repositories on an Ubuntu system
#! /bin/sh
# listppa Script to get all the PPA installed on a system ready to share for reininstall
# From: http://askubuntu.com/questions/148932/how-can-i-get-a-list-of-all-repositories-and-ppas-from-the-command-line
for APT in `find /etc/apt/ -name \*.list`; do
grep -o "^deb http://ppa.launchpad.net/[a-z0-9\-]\+/[a-z0-9\-]\+" $APT | while read ENTRY ; do
USER=`echo $ENTRY | cut -d/ -f4`
PPA=`echo $ENTRY | cut -d/ -f5`
echo sudo apt-add-repository ppa:$USER/$PPA
done
@rsrini7
rsrini7 / repo
Created June 1, 2016 06:16 — forked from febrianrendak/repo
List my PPA repo
firefox australis
sudo add-apt-repository ppa:ubuntu-mozilla-daily/ppa
sudo apt-get install firefox-trunk
sublimetext
sudo add-apt-repository ppa:webupd8team/sublime-text-2
sudo apt-get install sublime-text
Java Installer
sudo add-apt-repository ppa:webupd8team/java
@rsrini7
rsrini7 / OpenWithSublimeText3.bat
Created May 26, 2016 11:08 — forked from roundand/OpenWithSublimeText3.bat
Open folders and files with Sublime Text 3 from windows explorer context menu (tested in Windows 7)
@echo off
SET st3Path=C:\Program Files\Sublime Text 3\sublime_text.exe
rem add it for all file types
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3" /t REG_SZ /v "" /d "Open with Sublime Text 3" /f
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3" /t REG_EXPAND_SZ /v "Icon" /d "%st3Path%,0" /f
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3\command" /t REG_SZ /v "" /d "%st3Path% \"%%1\"" /f
rem add it for folders
@reg add "HKEY_CLASSES_ROOT\Folder\shell\Open with Sublime Text 3" /t REG_SZ /v "" /d "Open with Sublime Text 3" /f
@rsrini7
rsrini7 / visualvm.md
Created April 26, 2016 04:39 — forked from uarun/visualvm.md
Profiling a remote host using VisualVM

Remote VisualVM

Start RMI registry

$ rmiregistry -J-Djava.rmi.server.codebase=file:$JAVA_HOME/lib/tools.jar

Create Policy file for jstatd

  • Create a file named jstatd.all.policy
  • With the following contents: