Skip to content

Instantly share code, notes, and snippets.

View mrdcvlsc's full-sized avatar

Jubal Mordecai Velasco mrdcvlsc

  • Philippines
  • 19:52 (UTC +08:00)
View GitHub Profile
@mrdcvlsc
mrdcvlsc / ts-boilerplate.md
Created September 17, 2022 05:04 — forked from silver-xu/ts-boilerplate.md
Setup a Node.js project with Typescript, ESLint, Prettier, Husky

Setup a Node.js project with Typescript, ESLint, Prettier, Husky

1_D8Wwwce8wS3auLAiM3BQKA

Starting a personal node project could be easy; starting a team node project could be challenging.

I am a developer currently working in SEEK Australia.

In my experience, common mistakes developer make when starting a projects are:

  • No Linting
@mrdcvlsc
mrdcvlsc / simd_aes.h
Last active December 23, 2021 08:34
showing an example on how to encrypt and decrypt a 16 byte block with AES simd instructions
// Dec-23-2021
/* ====================== CONTENTS ======================
Byte == unsigned char
bool AESNI_IS_AVAILABLE();
void AesBlockEncrypt(const Byte* plain, Byte* cipher, const Byte* roundKeys, const size_t keyLength);
@mrdcvlsc
mrdcvlsc / intrinsic.md
Created November 23, 2021 09:42 — forked from detomon/intrinsic.md
SSE Intrinsic Cheat Sheet (SSE3)

SSE Intrinsic Cheat Sheet (SSE3)

Load and Store

__m128 _mm_load_ps (float * a)
{
@mrdcvlsc
mrdcvlsc / intrinsic.md
Created November 23, 2021 09:42 — forked from leopck/intrinsic.md
SSE Intrinsic Cheat Sheet (SSE3)

SSE Intrinsic Cheat Sheet (SSE3)

Load and Store

__m128 _mm_load_ps (float * a)
{
@mrdcvlsc
mrdcvlsc / libpng_test.c
Created October 19, 2021 09:05 — forked from niw/libpng_test.c
How to read and write PNG file using libpng. Covers trivial method calls like png_set_filler.
/*
* A simple libpng example program
* http://zarb.org/~gc/html/libpng.html
*
* Modified by Yoshimasa Niwa to make it much simpler
* and support all defined color_type.
*
* To build, use the next instruction on OS X.
* $ brew install libpng
* $ clang -lz -lpng16 libpng_test.c
@mrdcvlsc
mrdcvlsc / regular expression.md
Last active October 16, 2021 09:08
regex note

Regex - regular expression

you can think of it like... an advance string search tool/api, where you only need to write a token based condition when searching through a string

You don't need to code if-else statements and nest some loops just to find a substring in a base string for some unique type of substring searching or patter matching algorithm.

BASIC TERMS AND EXAMPLES

@mrdcvlsc
mrdcvlsc / boost_multiprecision_notes.cpp
Last active August 27, 2021 06:46
how to use boost boost multi precision
// HEADER FILES NEEDED
#include <boost/multiprecision/cpp_int.hpp> // for big integers
#include <boost/multiprecision/cpp_dec_float.hpp> // for large floating point
int main()
{
std::cout<<std::setprecision(2761); // set digit precision you want to see
// big integers
boost::multiprecision::cpp_int a = 1232;
@mrdcvlsc
mrdcvlsc / passport.js
Created December 17, 2020 01:03 — forked from manjeshpv/passport.js
Passport.js using MySQL for Authentication with Express https://manjeshpv.github.io/mean-development-guide-2021/
// config/passport.js
// load all the things we need
var LocalStrategy = require('passport-local').Strategy;
var mysql = require('mysql');
var connection = mysql.createConnection({
host : 'localhost',
user : 'root',