Skip to content

Instantly share code, notes, and snippets.

View thEpisode's full-sized avatar
🏠
Working from home

Camilo Rodriguez Cuaran thEpisode

🏠
Working from home
View GitHub Profile
var input = [
{name: "hola", age: 34},
{name: "hola1", age: 203},
{name: "hola2", age: 3},
{name: "hola3", age: 746},
{name: "hola4", age: 200},
{name: "hola5", age: 984},
{name: "hola6", age: 198},
{name: "hola7", age: 764},
{name: "hola8", age: 9}];
@thEpisode
thEpisode / aes-encryption.js
Created September 18, 2017 06:46
Basic usage of AES implementation in Node.js
/// Dependencies
const _config = require('config'); // Current version ^1.20.4
const _crypto = require("crypto-js"); // Current version ^3.1.9-1
/// Properties
var _password = _config.aesPassword; // Good recomendation,
// don't save passwords
// in plain text or source code
var _textToEncrypt = 'Hello World!';
@thEpisode
thEpisode / aes-ofb.js
Last active June 13, 2021 10:25
Basic usage of AES with Output Feedback
/// Use public CDN in your frontend <script type="text/javascript" src="https://cdn.rawgit.com/ricmoo/aes-js/e27b99df/index.js"></script>
// Convert it to base 36 (numbers + letters), and grab the first 9 characters
// after the decimal.
var randomStringGenerator = function (length, prefix) {
return (prefix == undefined ? 'key-' : prefix) + Math.random().toString(36).substr(2, (length == undefined ? 5 : length));
}
// Get ASCII numbers from a string as array
var stringToAscii = function(input){
@thEpisode
thEpisode / home.html
Last active September 21, 2017 17:32
Ionic 3.x camera
<ion-header>
<ion-navbar>
<ion-title>
Taking Photo
</ion-title>
</ion-navbar>
</ion-header>
<ion-content padding>
<img [src]="image" #imageResult />
@thEpisode
thEpisode / home.html
Last active November 2, 2018 17:04
Ionic 3.x image filters
<ion-header>
<ion-navbar>
<ion-title>
Taking Photo
</ion-title>
</ion-navbar>
</ion-header>
<ion-content padding>
<img [src]="image" #imageResult />
@thEpisode
thEpisode / home.html
Last active May 1, 2018 08:22
Ionic v3 OCR
<ion-header>
<ion-navbar>
<ion-title>
OCR Ionic 3
</ion-title>
</ion-navbar>
</ion-header>
<ion-content padding>
<span>{{recognizedText}}</span>

Keybase proof

I hereby claim:

  • I am thepisode on github.
  • I am thepisode (https://keybase.io/thepisode) on keybase.
  • I have a public key ASC_JCe7D95TMHCjxtfcV1AwGiRWiB-2TLd5n3JkAeOY1wo

To claim this, I am signing this object:

'use strict';
// Import dependencies
const crypto = require('crypto');
const bunyan = require('bunyan');
const levelup = require('levelup');
const encoding = require('encoding-down');
const leveldown = require('leveldown');
const kadence = require('@kadenceproject/kadence');
'use strict';
// Import dependencies
const crypto = require('crypto');
const bunyan = require('bunyan');
const levelup = require('levelup');
const encoding = require('encoding-down');
const leveldown = require('leveldown');
const kadence = require('@kadenceproject/kadence');
'use strict';
// Import dependencies
const crypto = require('crypto');
const bunyan = require('bunyan');
const levelup = require('levelup');
const encoding = require('encoding-down');
const leveldown = require('leveldown');
const kadence = require('@kadenceproject/kadence');
const { createHash } = require('crypto');