Skip to content

Instantly share code, notes, and snippets.

Avatar

JRichardsz jrichardsz

View GitHub Profile
View CustomError.md

CustomError.js

function CustomError(message, code, error) {
    this.constructor.prototype.__proto__ = Error.prototype
    this.code = code
    this.message = message
    if (error) {
        Error.captureStackTrace(error);
    }else{
View mock nodejs snippets - knex.md

target

function DevopsSettingsService(databaseConnector) {

  this.databaseConnector = databaseConnector;

  console.log(databaseConnector)

  this.createDevopsSettings = async (params) => {
@jrichardsz
jrichardsz / text to image text generator
Created Jul 18, 2022
text to image text generator
View text to image text generator
https://cooltext.com/Logo-Design-Gold-Trim
View bootstrap cards
<!DOCTYPE html>
<html class="no-js" xmlns="http://www.w3.org/1999/html"
xmlns="http://www.w3.org/1999/html">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Dataset Sound Collector</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
@jrichardsz
jrichardsz / index.html
Created Jul 18, 2022 — forked from nowucca/index.html
elementary material style
View index.html
<!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!-->
<html class="no-js" xmlns="http://www.w3.org/1999/html"
xmlns="http://www.w3.org/1999/html"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
@jrichardsz
jrichardsz / index.html
Last active Jul 18, 2022 — forked from ferminrp/index.html
Bootstrap elementary starter template
View index.html
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
<link rel="stylesheet" href="style.css">
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script>
<meta charset="utf-8">
View github pages
https://www.freecodecamp.org/news/publishing-an-organization-homepage-on-github-pages-347dbd700f4e/
@jrichardsz
jrichardsz / AESUtil.java
Last active Jul 13, 2022
aes 256 cbc snippets
View AESUtil.java
import java.io.UnsupportedEncodingException;
import java.security.Key;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.security.spec.AlgorithmParameterSpec;
import javax.crypto.Cipher;
import javax.crypto.spec.IvParameterSpec;
import javax.crypto.spec.SecretKeySpec;
import java.util.Base64;
View bash file change detector.sh
modified_info=/var/log/eb-docker/containers/eb-current-app/unexpected-quit.log.meta
log=/var/log/eb-docker/containers/eb-current-app/unexpected-quit.log
if [ ! -f $modified_info ]; then
_date=$(stat -c %y "$log")
echo $_date >> $modified_info
exit 0
fi
last_modification_date=$(awk '/./{line=$0} END{print line}' $modified_info)
now_date=$(stat -c %y "$log")
View ffmpeg flip mirror invert.md