Skip to content

Instantly share code, notes, and snippets.

View arjunkori's full-sized avatar

Arjun Kori arjunkori

  • Koricorp LTD
  • Mumbai,Maharastra,India
  • 03:23 (UTC +05:30)
View GitHub Profile
@arjunkori
arjunkori / CORSFilter.java
Created January 12, 2018 15:05 — forked from zeroows/CORSFilter.java
To enable CORS support in Spring MVC 4 - Access-Control-Allow-Origin
package com.elm.mb.rest.filters;
import java.io.IOException;
import javax.servlet.FilterChain;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.commons.logging.Log;
@arjunkori
arjunkori / Boottrap Validator
Created November 13, 2018 13:16
1.bootstrap password strengh validator
$('#change-password').bootstrapValidator({
feedbackIcons: {
valid: 'glyphicon glyphicon-ok',
invalid: 'glyphicon glyphicon-remove',
validating: 'glyphicon glyphicon-refresh'
},
fields: {
'new-password': {
validators: {
identical: {
@arjunkori
arjunkori / OpenSSH KEY Authentication Account Enumeration
Last active November 18, 2018 06:48
How to secue OpenSSH --OpenSSH S/KEY Authentication Account Enumeration
sudo vi /etc/ssh/sshd_config
ChallengeResponseAuthentication yes
AllowTcpForwarding no
Then
quite vim
:wq
/*
* MYSQL RESET AUTO INCREMENT TO 1
*/
SET @num := 0;
UPDATE your_table SET id = @num := (@num+1);
ALTER TABLE your_table AUTO_INCREMENT =1;
/*
* remove duplicate
nvm install v10.13.0
nvm current
nvm run 6.10.3 app.js
nvm install v6.16.0
nvm use v6.16.0
pm2 show app_name
PaymentUtil() {
this.indusIndFormatter = this.indusIndFormatter.bind(this);
this.space_gen = this.space_gen.bind(this);
this.hdfcFormatter = this.hdfcFormatter.bind(this);
this.hdfcFormatter_Part2 = this.hdfcFormatter_Part2.bind(this);
mysqlimport --ignore-lines=1 \--fields-terminated-by=, --local \--host 127.0.0.1 -u root -p password TableName.csv
yum install mysql-server
chkconfig mysqld on
service mysqld start
Update password on your local MySQL server if you want,
mysqladmin -u root password [your_new_pwd]
aws lambda get-function --function-name cq-backend-profile-dev-api-getLanguageCode --query 'Code.Location'
you will get signed url
Paste the output URL in browser will download the code
On mac
cd $HOME/.ssh
ssh-keygen -> codecommit_rsa (filename)
create file named empty config on ssh directory
touch config
chmod 600 config