Skip to content

Instantly share code, notes, and snippets.

Neil Hermosilla upbeta01

Block or report user

Report or block upbeta01

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
import numpy as np
a = np.matrix(
b = np.matrix(
View Drop All Open Connection (except yours) - PGDB
SELECT pg_terminate_backend( FROM pg_stat_activity WHERE datname = current_database() AND <> pg_backend_pid();
View Install MagicWormhole (deb8)
sudo apt-get install python-pip build-essential python-dev libffi-dev libssl-dev
sudo apt-get remove python-setuptools
sudo -H python
sudo -H pip install -U pip setuptools
sudo pip install magic-wormhole
upbeta01 /
Created Feb 5, 2018
Install Docker In Debian 9 (Stretch)
# -----------------------
# This is a script that installs docker-ce (Docker Community Edition) on Debian 9
# Inspired by
# -----------------------
# Pre-requesite
View gist:04cb9a94331b989b51cde811feba3354
mongoexport -h <host>:<port> -d <db> -c <collection_name> -u <db_user> -p <db_pass> -o <output.file> --csv -f <field_name> (comma separated)
upbeta01 / Postgresql 9.6
Created Nov 12, 2017
Debian Installation (Postgresql)
View Postgresql 9.6
wget -O - | sudo apt-key add -
vim /etc/apt/sources.list.d/pgdg.list
deb jessie-pgdg main 9.6
The following packages have unmet dependencies:
postgresql-client-9.6 : Depends: libpq5 (>= 9.6.5) but 9.4.15-0+deb8u1 is to be installed
# Author name: Ruel Nopal
# Company: RaketHost PH Inc.
# url:
echo "Input the full path of your Wordpress installation folder..."
echo "If you don't know the detail, run <pwd> command from the Wordpress installation folder and the path will be output."
echo "It should be something like </home/user/wordpress> or </var/www/wordpress>"
echo "Enter Wordpress Path: "
View gist:435e260457f3bc55e300a1364a3ebe8c
aws ec2 describe-security-groups --filters Name=ip-permission.from-port,Values=22,Values=22 --query 'SecurityGroups[*].IpPermissions[*].{IP:IpRanges}'
View awscli-security-group
aws ec2 describe-security-groups --filters "Name=ip-permission.from-port,Values=22" ",Values=22" --query 'SecurityGroups[*].{Name:GroupName,ID:GroupId,IP:IpPermissions}' --output table
----- THIS SHOWS ALL SECGROUPS (but not limited to port 22) -----
You can’t perform that action at this time.