Skip to content

Instantly share code, notes, and snippets.

[
{
"name": "/data/databases/LearningAdmin/AuthorV3",
"size": 170,
"imports": [
"/data/databases/LearningAdmin/ContentAuthorAssociationV2",
"/data/databases/LearningAdmin/CourseV4",
"/data/databases/LearningContent/ContentMigratedFrom",
"/data/databases/LyndaV2/Course"
]
@mrvicadai
mrvicadai / aes-256-cbc.md
Created May 21, 2019 23:48 — forked from chengen/aes-256-cbc.md
Using AES-256-CBC with openssl and nodejs with or whiout salt

Ecrypt data using aes-256-cbc without salt

$ echo  'this is hello world'  | openssl  aes-256-cbc -a -nosalt -k hello
HEQ/s/mOMof648tJxJvvwtHUTcq2j021RbgvqLA02lY=
-a means encoding the output using base64
-nosalt force openssl do encryption without salt
-k the encryption key
@mrvicadai
mrvicadai / gen.ml
Created May 1, 2019 19:58 — forked from dbuenzli/gen.ml
OCaml simple generators
(*---------------------------------------------------------------------------
Copyright (c) 2015 Daniel C. Bünzli. All rights reserved.
Distributed under the BSD3 license, see license at the end of the file.
%%NAME%% release %%VERSION%%
---------------------------------------------------------------------------*)
(* Simple generators according to:
Kiselyov, Peyton-Jones, Sabry
Lazy v. Yield: Incremental, Linear Pretty-printing
@mrvicadai
mrvicadai / tmux.conf
Created November 12, 2018 23:25 — forked from spicycode/tmux.conf
The best and greatest tmux.conf ever
# 0 is too far from ` ;)
set -g base-index 1
# Automatically set window title
set-window-option -g automatic-rename on
set-option -g set-titles on
#set -g default-terminal screen-256color
set -g status-keys vi
set -g history-limit 10000
@mrvicadai
mrvicadai / reparsecomb.re
Created September 17, 2018 23:24 — forked from zetashift/reparsecomb.re
Really barebones start of a parser combinator in ReasonML/OCaml
type result('a) =
| Success('a)
| Failure(string);
/* Encapsulate a parsing function in a type */
type parser('a) =
| Parser(string => result(('a, string)));
let reduce = (fn, list) =>
switch list {
@mrvicadai
mrvicadai / IndexedDB101.js
Created August 21, 2018 23:13 — forked from JamesMessinger/IndexedDB101.js
Very Simple IndexedDB Example
// This works on all devices/browsers, and uses IndexedDBShim as a final fallback
var indexedDB = window.indexedDB || window.mozIndexedDB || window.webkitIndexedDB || window.msIndexedDB || window.shimIndexedDB;
// Open (or create) the database
var open = indexedDB.open("MyDatabase", 1);
// Create the schema
open.onupgradeneeded = function() {
var db = open.result;
var store = db.createObjectStore("MyObjectStore", {keyPath: "id"});
@mrvicadai
mrvicadai / example-subtree-usage.md
Created April 26, 2018 22:11 — forked from kvnsmth/example-subtree-usage.md
A real world usage for git subtrees.

Let's say you have an iOS project, and you want to use some external library, like AFNetworking. How do you integrate it?

With submodules

Add the project to your repo:

git submodule add git@github.com:AFNetworking/AFNetworking.git Vendor/AFNetworking

or something to that effect.

@mrvicadai
mrvicadai / README.md
Created November 25, 2017 18:44 — forked from joyrexus/README.md
Node.js streams demystified

A quick overview of the node.js streams interface with basic examples.

This is based on @brycebaril's presentation, Node.js Streams2 Demystified

Overview

Streams are a first-class construct in Node.js for handling data.

Think of them as as lazy evaluation applied to data.

@mrvicadai
mrvicadai / npm-commands.md
Created November 21, 2017 02:53 — forked from ankurk91/npm-commands.md
Useful npm commands and tricks

npm v3.10 - ◾

Update npm itself

npm install -g npm
# Downgrade to a specific version
npm install -g npm@2