Skip to content

Instantly share code, notes, and snippets.

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

Rubén Soler RSginer

🏠
Working from home
View GitHub Profile

Keybase proof

I hereby claim:

  • I am rsginer on github.
  • I am rsginer (https://keybase.io/rsginer) on keybase.
  • I have a public key ASAaufHNFG-AzG75o63Os_ZfqhO2uMaFUyI0CR6JLN4oVgo

To claim this, I am signing this object:

@RSginer
RSginer / encrypt_openssl.md
Created June 19, 2020 15:39 — forked from dreikanter/encrypt_openssl.md
File encryption using OpenSSL

Symmetic encryption

For symmetic encryption, you can use the following:

To encrypt:

openssl aes-256-cbc -salt -a -e -in plaintext.txt -out encrypted.txt

To decrypt:

const fs = require('fs')
const es = require('event-stream')
var count = 0;
function swap(arr, a, b) {
let tmp = arr[a];
arr[a] = arr[b]
function quickSort(arr, low, hight) {
if (arr === null || arr.length === 0) return;
if (low >= hight) return;
// pick the pivot
let middle = Math.floor(low + (hight - low) / 2);
let pivot = arr[middle];
// left < pivot < right
let i = low;
@RSginer
RSginer / merge-sort-with-split-inversions-count.js
Created April 7, 2020 22:33
Merge Sort and Count Split Inversions
'use strict';
const arr = [1, 4, 5, 10, 8, 9, 6, 7];
function merge(B, C) {
let i = 0;
let j = 0;
let D = [];
let n = B.length + C.length;
let lastCopied = 'B'
@RSginer
RSginer / merge-sort.js
Last active April 7, 2020 22:23
Benchmark nodejs array sorting
'use strict';
const arr = [1, 4, 5, 10, 8, 9, 6, 7];
function merge(B, C) {
let i = 0;
let j = 0;
let D = [];
let n = B.length + C.length;
navigator.webkitGetUserMedia(
{ audio: true, video: true },
function (stream) {
var images = document.getElementsByTagName('img')
for (var i = 0; i < images.length; i++) {
var img = images[i];
var video = document.createElement('video');
video.height = img.height;
video.width = img.width;
video.style = img.style;
import java.util.*;
import java.lang.*;
import java.io.*;
class Ideone{
public static void main (String[] args){
String variableTipoString = "Soy una cadena de caracteres";
int variableTipoEntero = 777;
/* package whatever; // don't place package name! */
import java.util.*;
import java.lang.*;
import java.io.*;
/* Name of the class has to be "Main" only if the class is public. */
class Ideone
{
public static void main (String[] args) throws java.lang.Exception
/* package whatever; // don't place package name! */
import java.util.*;
import java.lang.*;
import java.io.*;
/* Name of the class has to be "Main" only if the class is public. */
class Ideone
{
public static void main (String[] args) throws java.lang.Exception