Skip to content

Instantly share code, notes, and snippets.

View harveytoro's full-sized avatar

Harvey harveytoro

View GitHub Profile
@harveytoro
harveytoro / technical-challenge.ts
Created August 31, 2022 00:27
Basic Execution: tsc technical-challenge.ts; node technical-challenge.js
// API
class Form {
public identifier: string;
public fields: Field<FieldValue>[] = [];
constructor(){
// basic identifier implementation for POC
this.identifier = Math.random().toString(16).substring(2)
# Basic Boxstarter
# Modified version of Jess Frazelle's https://gist.github.com/jessfraz/7c319b046daa101a4aaef937a20ff41f
# Install-BoxstarterPackage -PackageName <URL-TO-RAW-GIST> -DisableReboots
# Note Hyper-V stuff requires 10 pro
#---- TEMPORARY ---
Disable-UAC
#--- Windows Settings ---

Keybase proof

I hereby claim:

  • I am harveytoro on github.
  • I am harveytoro (https://keybase.io/harveytoro) on keybase.
  • I have a public key ASCgWA6bsXr2TomAev5IlzBvLP08UfMDmThRzyM37zXIwgo

To claim this, I am signing this object:

@harveytoro
harveytoro / gist:7376939
Created November 8, 2013 20:13
Change root password
sudo passwd root
@harveytoro
harveytoro / sendCV.php
Created October 20, 2013 15:19
Simple script that I am using with Twilio to send my CV to anyone that sends their email address to my Twilio number or so I can send it to someone quickly with a quick sms message. Requirements: PHPMailer (https://github.com/Synchro/PHPMailer)
<?php
require_once('mailer/class.phpmailer.php');
$myName = "YourName";
$email_pattern = "/^([a-z0-9\.\-\+\_\']+)@[a-z0-9\-\+\_]+\.[a-z0-9\-\+\_]*(\.?)[a-z0-9]+$/";
$email_address = trim($_POST['Body']);
$email = new PHPMailer();
$email->From = 'FromEmail';
$email->AddReplyTo('FromEmail', $myName);
$email->Mailer = 'mail';
@harveytoro
harveytoro / Comment Templates
Last active December 20, 2015 02:09
Because we all love code comments
/*******************************************************************************
* Title Here *
* *
* Optional description space *
* *
* @author *
* @version *
* @date *
* @license *
*******************************************************************************/
^([a-z0-9\.\-\+\_]+)@[a-z0-9\-\+\_]+\.[a-z0-9\-\+\_]*(\.?)[a-z0-9]+$
@harveytoro
harveytoro / modpow.java
Created November 22, 2012 11:25
Modular Exponentiation Java method
public static int modpow(int value , int power, int mod){
int e = 1;
for (int i = 0; i < power; i++) {
e = ((e * value) % mod);
}
return e;
}//modpow
#include <stdio.h>
int main(int argc, char *argv[]) {
int e = 1; // variable part of the Modular exponentiation algorithm.
int charInput = 97; // ASCII value of a
//Public keys
int n = 3233;
int k = 17;
BigInteger kp;
kp = new BigInteger("17");
BigInteger np;
np = new BigInteger("3233");
BigInteger xp;
xp = new BigInteger("25");
BigInteger E;
E = xp.modPow(kp,np);
//BigInteger result = x.modPow(17, 3233);