Skip to content

Instantly share code, notes, and snippets.

View FrankHassanabad's full-sized avatar
🎧
Eat Sleep Code Repeat

Frank Hassanabad FrankHassanabad

🎧
Eat Sleep Code Repeat
  • https://radicl.com/
  • Boulder, Co
View GitHub Profile
@FrankHassanabad
FrankHassanabad / gist:95f3886260c02b89ca84
Created February 13, 2015 20:19
Change three little circles
//On the page http://bost.ocks.org/mike/circles/
//This will change the first set of circles as an example of
//how all of that works. Paste this into your chrome console
//when on that page and then execute changeFirstCircles([4, 4, 4])
//or any other numbers you want.
var chanageFirstCircles = function(newDataSet)
{
// Generic function that binds the data
var f = function(d) { return d; }
@FrankHassanabad
FrankHassanabad / README.md
Last active August 29, 2015 14:16 — forked from mbostock/.block
Certs:
https://www.googleapis.com/oauth2/v3/certs
PEM:
https://www.googleapis.com/oauth2/v1/certs
/ )( \
) __ (
\_)(_/
__
/ _\
/ \
\_/\_/
____
( _ \
) __/
* Download Atom Editor and install it
* Go to packages to install a package and install
- git-plus
- last-cursor-position
- line-diff-details
- linter
- linter-eslint
- merge-conflicts
- preview
@FrankHassanabad
FrankHassanabad / Testing Gist
Created June 26, 2013 05:52
Testing a gist
This is my test Gist.
@FrankHassanabad
FrankHassanabad / crib-phone-example.js
Created March 17, 2018 20:45
Crib phone example
for (let i = 0; i < encryptedPhoneNumbers.length - 1; ++i) {
const encryptedPhoneNum1 = encryptedPhoneNumbers[i];
const encryptedPhoneNum2 = encryptedPhoneNumbers[i + 1];
const xor = xorStrings(encryptedPhoneNum1, encryptedPhoneNum2);
const output = xorPlainTextWithCrib(xor, inputPhoneNum);
if (asciiMatch(output, '^[0-9]+\-[0-9]+\-[0-9]+$')) {
matches = matches.concat([[encryptedPhoneNum1, encryptedPhoneNum2]]);
}
}
@FrankHassanabad
FrankHassanabad / crib-phone-example-2.js
Last active March 17, 2018 21:43
Crib drag example 2
encryptedPhoneNumbers.forEach((encryptedPhoneNumber) => {
const xor = xorStrings(encryptedPhoneNumber, exactMatch);
const output = xorPlainTextWithCrib(xor, inputPhoneNum);
printPlain(output);
});
@FrankHassanabad
FrankHassanabad / openssl_example.sh
Created March 17, 2018 21:59
Openssl key generation example
openssl genrsa -aes128 -out private.key 2048
Generating RSA private key, 2048 bit long modulus
....+++ ....… +++
e is 65537 (0x10001)
Enter pass phrase for private.key: ****************
Verifying - Enter pass phrase for fd.key: ****************
@FrankHassanabad
FrankHassanabad / mdn_crypto.js
Created March 18, 2018 17:25
MDN Crypto Example
/* assuming that window.crypto.getRandomValues is available */
var array = new Uint32Array(10);
window.crypto.getRandomValues(array);
console.log("Your lucky numbers:");
for (var i = 0; i < array.length; i++) {
console.log(array[i]);
}