Skip to content

Instantly share code, notes, and snippets.

View joeneldeasis's full-sized avatar
🎯
ଘ(੭*ˊᵕˋ)੭* ̀ˋ sᴀᴠᴇ ᴛʜᴇ ɪɴᴛᴇʀɴᴇᴛ

Joenel de Asis joeneldeasis

🎯
ଘ(੭*ˊᵕˋ)੭* ̀ˋ sᴀᴠᴇ ᴛʜᴇ ɪɴᴛᴇʀɴᴇᴛ
View GitHub Profile
@joeneldeasis
joeneldeasis / config
Created November 28, 2025 08:46
config
location ^~ /api/files/ {
proxy_pass http://127.0.0.1:8080;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
@joeneldeasis
joeneldeasis / guide
Last active November 13, 2025 05:21
guide
https://claude.ai/share/174ead5b-74bf-4df3-9cc8-e497c0cf456f
https://claude.ai/share/80b69f30-4414-4d42-b7a7-073113cd9079
https://chatgpt.com/share/69156ae1-0220-8005-8b00-ca11b31c15a5
@joeneldeasis
joeneldeasis / docker-compose-mariadb.yml
Created November 13, 2025 02:33
docker-compose-mariadb.yml
services:
mariadb:
image: mariadb:11.4.7
container_name: mariadb
restart: unless-stopped
environment:
MARIADB_ROOT_PASSWORD: rootpass123
MARIADB_DATABASE: appdb
MARIADB_USER: appuser
MARIADB_PASSWORD: apppass123
@joeneldeasis
joeneldeasis / docker-compose-redis.yml
Created November 13, 2025 02:31
docker-compose-redis.yml
services:
redis:
image: redis:7-alpine
container_name: redis
restart: unless-stopped
command: >
redis-server
--appendonly yes
--save "900 1" --save "300 10" --save "60 10000"
--maxmemory-policy allkeys-lru
@joeneldeasis
joeneldeasis / setup-tor.md
Created August 14, 2022 08:44 — forked from skippednote/setup-tor.md
Setup Tor on macOS

Setup One: Buy a Mac if you don't have one.

Setup Two: Install Homebrew

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Setup Three:

@joeneldeasis
joeneldeasis / imagemagick.bash
Created February 27, 2022 01:47 — forked from bensie/imagemagick.bash
ImageMagick Static Binaries for AWS Lambda
#!/usr/bin/env bash
# Must be run on an Amazon Linux AMI that matches AWS Lambda's runtime which can be found at:
# https://docs.aws.amazon.com/lambda/latest/dg/current-supported-versions.html
#
# As of May 21, 2019, this is:
# Amazon Linux AMI 2018.03.0 (ami-0756fbca465a59a30)
#
# You need to prepend PATH with the folder containing these binaries in your Lambda function
# to ensure these newer binaries are used.
@joeneldeasis
joeneldeasis / encryption.js
Created June 24, 2021 06:09 — forked from anned20/encryption.js
Encrypting files with NodeJS
const crypto = require('crypto');
const algorithm = 'aes-256-ctr';
let key = 'MySuperSecretKey';
key = crypto.createHash('sha256').update(String(key)).digest('base64').substr(0, 32);
const encrypt = (buffer) => {
// Create an initialization vector
const iv = crypto.randomBytes(16);
// Create a new cipher using the algorithm, key, and iv
const cipher = crypto.createCipheriv(algorithm, key, iv);
@joeneldeasis
joeneldeasis / spike.js
Created February 15, 2021 09:48 — forked from raytung/spike.js
AWS KMS NodeJS
/*
* AWS Sdk KMS spike: (assuming node v6.6+)
* 1 - Create master key at KMS
* 2 - Copy alias or ARN
* 3 - run this i.e.
* $ node spike.js KEY_ALIAS YOUR_PLAINTEXT_TO_ENCRYPT
*/
const AWS = require('aws-sdk');
// aws-sdk is not reading my region info so i'll have to set it here
@joeneldeasis
joeneldeasis / nodeJs.crypto.calculatingHash.js
Created October 5, 2020 02:15 — forked from GuillermoPena/nodeJs.crypto.calculatingHash.js
NodeJS - CRYPTO : How to calculate a hash from file or string
var crypto = require('crypto')
, fs = require('fs')
// Algorithm depends on availability of OpenSSL on platform
// Another algorithms: 'sha1', 'md5', 'sha256', 'sha512' ...
var algorithm = 'sha1'
, shasum = crypto.createHash(algorithm)
// Updating shasum with file content
var filename = __dirname + "/anything.txt"
@joeneldeasis
joeneldeasis / client.html
Created May 8, 2020 02:09 — forked from agrueneberg/client.html
HMAC-SHA256 example for verifying both the data integrity and the authentication of a request in Node.js and web browsers.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>HMAC-SHA256 Example</title>
</head>
<body>
<script src="http://crypto.stanford.edu/sjcl/sjcl.js"></script>
<script>
var sharedSecret, query, signature, hmac, xhr;