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 / 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 / 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

#Create bitbucket branch

##Create local branch

$ git checkout -b sync
Switched to a new branch 'sync'
$ git branch
  master
* sync
@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.

@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 / 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 / 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 / ChangePassword.java
Created January 28, 2017 09:01 — forked from zach-klippenstein/ChangePassword.java
The keystore password on Java keystore files is utterly pointless. You can reset it without knowing it, as shown by this code. Note that private keys are still secure, as far as I know. The JKS implementation is copyright Casey Marshall (rsdio@metastatic.org), and the original source is available at http://metastatic.org/source/JKS.java. I've in…
import java.util.*;
import java.io.*;
import java.security.*;
public class ChangePassword
{
private final static JKS j = new JKS();
public static void main(String[] args) throws Exception
{
function render() {
aleph = Blockly.svg.cloneNode(true);
aleph.removeAttribute("width");
aleph.removeAttribute("height");
aleph.removeChild(aleph.children[0]);
aleph.removeChild(aleph.children[1]);
aleph.removeChild(aleph.children[1]);
if (aleph.children[0].children[1].children[0] !== undefined) {
aleph.children[0].removeChild(aleph.children[0].children[0]);
aleph.children[0].children[0].removeAttribute("transform");
AR \ BC | Check in | Drop L. | Passp. C | Board | Transit |
----------+----------+---------+----------+-------+---------+
Passenger | Y | | Y | Y | |
----------+----------+---------+----------+-------+---------+
Luggage | Y | Y | | | Y |
----------+----------+---------+----------+-------+---------+
Flight | Y | | | | |
----------+----------+---------+----------+-------+---------+
Three bounded contexts: