Skip to content

Instantly share code, notes, and snippets.

View hyokosdeveloper's full-sized avatar
🍉
7342 commits and counting...

hyokos hyokosdeveloper

🍉
7342 commits and counting...
  • Descartes
  • New York City
  • 13:25 (UTC -04:00)
View GitHub Profile
@hyokosdeveloper
hyokosdeveloper / better-nodejs-require-paths.md
Created April 11, 2025 10:39 — forked from branneman/better-nodejs-require-paths.md
Better local require() paths for Node.js

Better local require() paths for Node.js

Problem

When the directory structure of your Node.js application (not library!) has some depth, you end up with a lot of annoying relative paths in your require calls like:

const Article = require('../../../../app/models/article');

Those suck for maintenance and they're ugly.

Possible solutions

@hyokosdeveloper
hyokosdeveloper / 01_self-signed-ssl-howto.md
Created April 5, 2025 00:12 — forked from justinhartman/01_self-signed-ssl-howto.md
How to create self-signed SSL certificates for localhost that actually works

How to create self-signed SSL certificates for localhost

Option 1

Create a directory in your user root directory where we will store the necessary generated files.

$ cd ~/
$ mkdir .localhost
$ cd .localhost

Now run this single command and you will have both a certificate and private key which was used to sign the certificate.

@hyokosdeveloper
hyokosdeveloper / pdf2excel.py
Created February 17, 2025 04:27 — forked from scionoftech/pdf2excel.py
this is a python script to extract tables from pdf and convert to excel
import click
from pathlib import Path
import pdfplumber
import pandas as pd
from pandas import ExcelWriter
def to_excel(path, output_path):
with pdfplumber.open(path) as pdf:
data = []
@hyokosdeveloper
hyokosdeveloper / Dropzone with Python 3
Created December 11, 2024 18:22 — forked from MichaelCurrie/ Dropzone with Python 3
Drag-and-drop upload files, via JavaScript, to a simple Python 3 HTTP server
#Drag-and-drop upload files, via JavaScript, to a simple Python 3 HTTP server
@hyokosdeveloper
hyokosdeveloper / Dropzone with Python 3
Created December 11, 2024 18:22 — forked from dublado/ Dropzone with Python 3
Drag-and-drop upload files, via JavaScript, to a simple Python 3 HTTP server
#Drag-and-drop upload files, via JavaScript, to a simple Python 3 HTTP server
@hyokosdeveloper
hyokosdeveloper / openstackcli.sh
Last active April 5, 2025 21:05
BASH Utility for easy openstack tasks
# ** ref to open stack rc containing envvars and credentials **
OPENSTACKRC=./openstackrc.sh
#
# Functions
#
connect(){
@hyokosdeveloper
hyokosdeveloper / README.md
Created July 6, 2024 02:49 — forked from mauron85/README.md
PM2 as a Windows Service under Local Service

PM2 as a Windows Service under Local Service

This is a PoC for running PM2 as a Windows Service under the Local Service account instead of the Local System account.

Prerequsites

  • Neither pm2 or pm2-windows-service installed yet. (The Powershell script will run npm i)
    • At the very least, you should run pm2-service-uninstall before running this script
  • npm and npm-cache global folders should be somewhere accessible to NT AUTHORITY\LocalService.

Need to do this in both php.ini files !!!

Attention Wamp/Wordpress/windows users. I had this issue for hours and not even the correct answer was doing it for me, because I was editing the wrong php.ini file because the question was answered to XAMPP and not for WAMP users, even though the question was for WAMP.

here's what I did

Download the certificate bundle.

Put it inside of C:\wamp64\bin\php\your php version\extras\ssl

@hyokosdeveloper
hyokosdeveloper / how-to-install-homebrew-on-debian-based-distros.md
Created January 25, 2024 18:53 — forked from fardjad/how-to-install-homebrew-on-debian-based-distros.md
[How to Install Homebrew on Debian-based Distros] Steps required to install homebrew on MX Linux (and other Debian-based distros) #linux #debian #mxlinux #homebrew

How to Install Homebrew on Debian-based Distros

Steps required to install Homebrew on MX Linux (and other Debian-based distros)

Steps

  1. Update apt cache and optionally do a full upgrade

     apt update
    

apt full-upgrade # optional, reboot if needed

# See http://superuser.com/questions/14403/how-can-i-download-an-entire-website
# You can install wget in mac with brew.
wget --mirror -p --html-extension --convert-links www.example.com