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 / Testing Gist
Created June 26, 2013 05:52
Testing a gist
This is my test Gist.
@FrankHassanabad
FrankHassanabad / AdvancedRestClientOAuth2orize.md
Last active July 22, 2019 09:10
Using Advanced Rest Client with OAuth2orize's example

Advanced Rest Client with OAuth2orize

For this to work you will need to install the Advanced Rest Client for some of these steps. Of course you will need to install OAuth2orize as well.

Run the oauth2orize provider/server example which does server-side OAuth flow:

cd oauth2orize\examples\express2
node app.js
@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 / 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: ****************