Skip to content

Instantly share code, notes, and snippets.

View Kurukshetran's full-sized avatar
🎯
Focusing

Kurukshetran Kurukshetran

🎯
Focusing
View GitHub Profile
@Kurukshetran
Kurukshetran / gist:3fadc70a7f7b6367846b1d8fd4e86afb
Created January 27, 2017 07:15 — forked from sebsto/gist:19b99f1fa1f32cae5d00
Install Maven with Yum on Amazon Linux
sudo wget http://repos.fedorapeople.org/repos/dchen/apache-maven/epel-apache-maven.repo -O /etc/yum.repos.d/epel-apache-maven.repo
sudo sed -i s/\$releasever/6/g /etc/yum.repos.d/epel-apache-maven.repo
sudo yum install -y apache-maven
mvn --version
@Kurukshetran
Kurukshetran / gist:24a2f00a25abf713a2cd6f238f02b4ff
Created February 19, 2017 20:00 — forked from jmervine/gist:2079897
installing mysql on ubuntu using an aws instance
$ sudo apt-get install mysql-server mysql-client
... output omitted ...
$ sudo mysqladmin -u root -h localhost password 'password'
... output omitted ...
$ mysql -u root -p
... output omitted ...
mysql> GRANT ALL PRIVILEGES ON *.* TO 'root'@'your_host_name' IDENTIFIED BY "password";
Query OK, 0 rows affected (0.00 sec)
mysql> FLUSH PRIVILEGES;
@Kurukshetran
Kurukshetran / jenkins-ec2-continous-integration.md
Created March 3, 2017 13:12 — forked from stephenharris/jenkins-ec2-continous-integration.md
How to set up CI with Jenkins on AWS EC2 (and some notes)
curl -XDELETE localhost:9200/*
@Kurukshetran
Kurukshetran / Snippet.txt
Created March 22, 2017 06:14
Jasper Dynamic Images
// Snippet 1
Dynamic Image in Jasper Report
jrxml content
<image>
<reportElement x="5" y="5" width="200" height="90"/>
<imageExpression class="java.awt.Image"><![CDATA[$P{logo}]]></imageExpression>
</image>
@Kurukshetran
Kurukshetran / README.md
Created April 14, 2017 15:57 — forked from leonardofed/README.md
A curated list of AWS resources to prepare for the AWS Certifications


A curated list of AWS resources to prepare for the AWS Certifications

A curated list of awesome AWS resources you need to prepare for the all 5 AWS Certifications. This gist will include: open source repos, blogs & blogposts, ebooks, PDF, whitepapers, video courses, free lecture, slides, sample test and many other resources.

For more about AWS and AWS Certifications and updates to this Gist you should follow me @leonardofed


// The following code is from http://www.academicpub.org/PaperInfo.aspx?PaperID=14496 .
import java.math.BigInteger;
import java.security.*;
import java.security.spec.*;
import javax.crypto.KeyAgreement;
public class ECCKeyAgreement {
public static void main(String[] args) throws Exception {
KeyPairGenerator kpg;
kpg = KeyPairGenerator.getInstance("EC","SunEC");
@Kurukshetran
Kurukshetran / SftpInboundReceiveSample-context.xml
Created May 16, 2017 19:04 — forked from garyrussell/SftpInboundReceiveSample-context.xml
Spring Integration SftpPersistenFileListFilter Example
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:int="http://www.springframework.org/schema/integration"
xmlns:int-sftp="http://www.springframework.org/schema/integration/sftp"
xmlns:task="http://www.springframework.org/schema/task"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:int-stream="http://www.springframework.org/schema/integration/stream"
xsi:schemaLocation="http://www.springframework.org/schema/integration/stream http://www.springframework.org/schema/integration/stream/spring-integration-stream-4.0.xsd
http://www.springframework.org/schema/integration/sftp http://www.springframework.org/schema/integration/sftp/spring-integration-sftp.xsd
@Kurukshetran
Kurukshetran / query_finder.sql
Created May 28, 2017 11:18 — forked from mezis/query_finder.sql
Finding long-running queries in MySQL
SELECT id,state,command,time,left(replace(info,'\n','<lf>'),120)
FROM information_schema.processlist
WHERE command <> 'Sleep'
AND info NOT LIKE '%PROCESSLIST%'
ORDER BY time DESC LIMIT 50;
@Kurukshetran
Kurukshetran / LFSR.java
Created May 28, 2017 21:27 — forked from KartikTalwar/LFSR.java
Galois linear feedback shift register (LFSR)
/*
* Galois linear feedback shift register (LFSR) in Java
* Copyright (c) 2012 Nayuki Minase
*/
import java.math.BigInteger;
import java.util.Random;
/**