Skip to content

Instantly share code, notes, and snippets.

View nfhipona's full-sized avatar
:shipit:
Slacking remotely

Neil Francis Ramirez Hipona nfhipona

:shipit:
Slacking remotely
View GitHub Profile
@nfhipona
nfhipona / MySQL Cheat Sheet.md
Last active April 23, 2018 05:26 — forked from hofmannsven/README.md
My simply MySQL Command Line Cheatsheet
@nfhipona
nfhipona / ubuntu_port_forwarding.md
Last active June 9, 2020 06:27 — forked from siddhuwarrier/ubuntu_port_forwarding
Port forward from port 9000 to port 80 on an Ubuntu machine using IPtables (exposing Sonar on port 80)

Setting up port for re-routing requests: ex. req to port: 8080 -> port 9000

  • iptables -A PREROUTING -t nat -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 9000
  • iptables-save

Example:

sudo iptables -A PREROUTING -t nat -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 4776
sudo iptables -A PREROUTING -t nat -i eth0 -p tcp --dport 443 -j REDIRECT --to-port 4776
@nfhipona
nfhipona / deploy-npm-package.sh
Created November 12, 2018 08:27
script for deploying npm package
#! /bin/bash
./node_modules/.bin/babel src --out-dir lib && npm publish
rsync -a --progress --stats --human-readable path_to_source path_to_dest
@nfhipona
nfhipona / redis-server configuration
Created January 18, 2019 01:30
Instruction to redis on Mac, Ubuntu and Windows
How to start and stop Redis server on Mac, Linux, and Windows?
October 30, 2018
In this post, we will show you some quick ways to start and stop Redis database server on multiple operating systems: macOS, Linux, Windows.
``1. On macOS``
Getting started with Redis is quite easy and straightforward. Using Homebrew, you can get it up and running within a couple of commands:
To install Redis on Mac:
@nfhipona
nfhipona / git - workflow rules.md
Last active July 23, 2021 12:27
git workflow and rules

MANDATORY GIT WORKFLOW RULES:

master

  • core production branch
  • do not push directly.
  • all hotfix/? code will always be forked from master branch
  • merges should be from PR (supervised). PR should be either hotfix/?, patch/? or from release/? for final live build
  • updates (hotfix/patch) should be merged back to develop - means this branch will not be in sync with develop, but its changes (hotfix) will always be synched back to develop
@nfhipona
nfhipona / cronjob - mysqldump
Last active July 19, 2020 05:12
Crontab - mysqldump
crontab schedule:
30 23 * * * mysqldump -hhost -uuser -ppassword dbname --single-transaction --quick --lock-tables=false > ..location/filename-backup-`date "+\%F"`.sql
running script
30 23 * * 7 /home/ubuntu/scripts/./bash_script.sh
manual dump bash
mysqldump -hhost -uuser -ppassword dbname --single-transaction --quick --lock-tables=false > ..location/filename-backup-`date '+%F'`.sql
@nfhipona
nfhipona / pldt-home-fibr-an5506-04-fa-rp2627-advanced-settings.md
Created October 29, 2019 05:20 — forked from kleo/backspace.md
PLDT HOME FIBR AN5506-04-FA RP2627 Advanced Settings

PLDT HOME FIBR AN5506-04-FA RP2627 Advanced Settings


[Notice]

Project moved to https://gitlab.com/kbeflo/fiberhomesuperadmin due to excessive amount of unicorns.
Gist here will not be updated anymore
Discussion here on Gist is still allowed but I strongly recommend going over to Gitlab or Discord chat

@nfhipona
nfhipona / debloatNox.md
Created October 31, 2019 02:38 — forked from Log1x/debloatNox.md
Debloating & Optimizing Nox

Debloating Nox

Nox, despite being the most feature-filled Android emulator, has a lot of negativity surrounding it due to their antics when it comes to making income off of their program. It is known for running repeated advertisments in the background, calling home and passing along system information (outside of your Android instance) as well as a vast amount of potentially sensitive data in an encrypted payload back to their multitude of servers. With the following preventitive measures, we can stop a majority of this happening as well as greatly improve the overall performance.

  1. Download and Install a fresh copy of Nox. The latest version is fine (for now). If you already have it installed, that is fine too. No need to reinstall.

  2. Enable Root Mode on Nox by clicking the gear icon and then checking the Root Startup box.

  3. Install a new Launcher from the Play Store. ANYTHING but Nox's default. I suggest [Nova Launcher](https://play.google.com/s

@nfhipona
nfhipona / HTB - cat - text file > image file
Created November 22, 2019 10:15
HTB -- dump text file content into an image file
cat file.txt | sed '/^\s*$/d' | base64 -d | xxd -r -p > image.png