Skip to content

Instantly share code, notes, and snippets.

View amitkriit's full-sized avatar

Amit Kumar amitkriit

View GitHub Profile
@amitkriit
amitkriit / JavaPasswordSecurity.java
Created February 8, 2018 07:03 — forked from jtan189/JavaPasswordSecurity.java
Java PBKDF2 Password Hashing Code
import java.security.SecureRandom;
import javax.crypto.spec.PBEKeySpec;
import javax.crypto.SecretKeyFactory;
import java.math.BigInteger;
import java.security.NoSuchAlgorithmException;
import java.security.spec.InvalidKeySpecException;
/*
* PBKDF2 salted password hashing.
* Author: havoc AT defuse.ca
@amitkriit
amitkriit / README.md
Created February 12, 2018 14:15 — forked from seignovert/README.md
[Server] Install Gitlab and Mattermost with Let's Encrypt on Ubuntu 16.04

Gitlab and Mattermost installation

Inital DNS and contact emails

Add A record for the following website:

  • git.example.com
  • forum.example.com

And add email redirection for these emails:

  • support.git@example.com
  • forum@example.com
@amitkriit
amitkriit / i2c.c
Created September 13, 2022 19:08 — forked from JamesDunne/i2c.c
C library for reading/writing I2C slave device registers from Raspberry Pi 1 Model B
#include <stdio.h>
#include <string.h>
#include <fcntl.h>
#include <linux/i2c-dev.h>
// Terrible portability hack between arm-linux-gnueabihf-gcc on Mac OS X and native gcc on raspbian.
#ifndef I2C_M_RD
#include <linux/i2c.h>
#endif