This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
mkdir storage | |
mkdir storage/logs | |
mkdir storage/app | |
mkdir storage/framework | |
mkdir storage/framework/cache | |
mkdir storage/framework/sessions | |
mkdir storage/framework/views | |
chmod -R 777 storage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
aws ec2 describe-security-groups --filters "Name=ip-permission.from-port,Values=22" "Name=ip-permission.to-port,Values=22" --query 'SecurityGroups[*].{Name:GroupName,ID:GroupId,IP:IpPermissions}' --output table | |
----- THIS SHOWS ALL SECGROUPS (but not limited to port 22) ----- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
aws ec2 describe-security-groups --filters Name=ip-permission.from-port,Values=22 Name=ip-permission.to-port,Values=22 --query 'SecurityGroups[*].IpPermissions[*].{IP:IpRanges}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Author name: Ruel Nopal | |
# Company: RaketHost PH Inc. | |
# url: www.rakethost.ph | |
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: " |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wget -O - http://apt.postgresql.org/pub/repos/apt/ACCC4CF8.asc | sudo apt-key add - | |
vim /etc/apt/sources.list.d/pgdg.list | |
deb http://apt.postgresql.org/pub/repos/apt/ jessie-pgdg main 9.6 | |
ERROR: | |
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mongoexport -h <host>:<port> -d <db> -c <collection_name> -u <db_user> -p <db_pass> -o <output.file> --csv -f <field_name> (comma separated) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# ----------------------- | |
# | |
# This is a script that installs docker-ce (Docker Community Edition) on Debian 9 | |
# Inspired by https://gist.github.com/frgomes/a6f889583860f5b330c06c8b46fa0f42 | |
# | |
# ----------------------- | |
# Pre-requesite |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt-get install python-pip build-essential python-dev libffi-dev libssl-dev | |
sudo apt-get remove python-setuptools | |
wget https://bootstrap.pypa.io/get-pip.py | |
sudo -H python get-pip.py | |
sudo -H pip install -U pip setuptools | |
sudo pip install magic-wormhole |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT pg_terminate_backend(pg_stat_activity.pid) FROM pg_stat_activity WHERE datname = current_database() AND pg_stat_activity.pid <> pg_backend_pid(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
a = np.matrix( | |
[[-1,0,4], | |
[2,0,0]] | |
) | |
b = np.matrix( | |
[[-1,1], | |
[-1,3], |
OlderNewer