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 / 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 / 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

For Xcode 8.2 or later

You can take videos and screenshots of Simulator using the xcrun Xcode command-line utility.

  1. Run your app on the simulator.

  2. Open Terminal.app

  3. Run the command

    • To take a screenshot, xcrun simctl io booted screenshot <filename>.<file extension>.
    • To take a video, xcrun simctl io booted recordVideo <filename>.<file extension>.

    For example screenshot: xcrun simctl io booted screenshot myScreenshot.png

@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 / Install MongoDB Agent.md
Created June 10, 2020 08:07
Install New MongoDB Agent

Download the agent

curl -OL https://cloud.mongodb.com/download/agent/automation/mongodb-mms-automation-agent-manager_10.14.6.6374-1_amd64.ubuntu1604.deb

and install the package.

sudo dpkg -i mongodb-mms-automation-agent-manager_10.14.6.6374-1_amd64.ubuntu1604.deb
@nfhipona
nfhipona / Make MongoDB Dump.md
Last active June 10, 2020 11:09
MongoDB Dump File Command

Create dump mongodump

mongodump --host <DB_HOST> --port <DB_PORT> -u <DB_USER> -p <DB_PASS> -d <DB_NAME> --authenticationDatabase admin

Options

--quiet -- if system is running out of memory

--out -- output directory -- defaults to dump/<db_name>