Skip to content

Instantly share code, notes, and snippets.

@phenomax
phenomax / iotaseed.rs
Last active December 16, 2017 20:55
Simple IOTA Seed & Argon2 Hash Generator written in Rust
extern crate rand;
extern crate argon2rs;
use rand::distributions::{Range, IndependentSample};
use rand::OsRng;
use std::{thread, time};
fn main() {
let alphabet = ["9", "A", "B", "C", "D", "E", "F", "G", "H", "I",
"J", "K", "L", "M", "N", "O", "P", "Q", "R", "S",

Keybase proof

I hereby claim:

  • I am phenomax on github.
  • I am phenomax (https://keybase.io/phenomax) on keybase.
  • I have a public key whose fingerprint is C6F0 FD8F 4A71 E73E B1E9 7F5E 742A 58B4 F865 8423

To claim this, I am signing this object:

@phenomax
phenomax / regex.php
Created June 5, 2016 08:30
A simple PHP IPv4 regex checker, including an optional solution
/**
* @param $str the string to check
* @return bool whether the String $str is a valid ip or not
*/
function isValidIP($str)
{
/**
* Alternative solution using filter_var
*
* return (bool)filter_var($str, FILTER_VALIDATE_IP);