Skip to content

Instantly share code, notes, and snippets.

View amannirala13's full-sized avatar
πŸ˜ͺ
Procrastinating

Aman Nirala amannirala13

πŸ˜ͺ
Procrastinating
View GitHub Profile
@amannirala13
amannirala13 / ID3v1.java
Last active December 30, 2022 08:43
ID3v1 details reader application in JAVA
/* ID3v1 extracting application :)
Developer Aman Nirala
*/
/*It reads all the files in the directory and finds the mp3 files and print the details of the mp3 file only using ID3v1 tag.
If your ID3 data is not shown this means that either the ID3 tag is missing or if present is not ID3v1 */
import java.io.*;
import java.util.*;
@lovubuntu
lovubuntu / Sha256.kt
Created November 24, 2017 15:58
function to generate Sha-256 in Kotlin
Class Hasher {
fun hash(): String {
val bytes = this.toString().toByteArray()
val md = MessageDigest.getInstance("SHA-256")
val digest = md.digest(bytes)
return digest.fold("", { str, it -> str + "%02x".format(it) })
}
}
@tanyuan
tanyuan / unity-arduino-serial.md
Last active June 13, 2023 17:18
Unity writes Arduino via serial port

Unity Writes Arduino via Serial Port

Tap 1 0 keys in Unity will make Arduino LED light on/off.

Arduino

const int ledPin = 13;
int ledState = 0;
@ravibharathii
ravibharathii / Strong Password RegEx
Created October 29, 2012 18:03
A Regular Expression for a Strong Password
Description of this regular expression is as below:
Passwords will contain at least 1 upper case letter
Passwords will contain at least 1 lower case letter
Passwords will contain at least 1 number or special character
Passwords will contain at least 8 characters in length
Password maximum length should not be arbitrarily limited
(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$