Skip to content

Instantly share code, notes, and snippets.

View upbeta01's full-sized avatar

Neil Hermosilla upbeta01

  • Cebu, PH
  • 07:46 (UTC +08:00)
  • X @upbeta
View GitHub Profile
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
upbeta01 / Postgresql 9.6
Created November 12, 2017 07:20
Debian Installation (Postgresql)
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
#!/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: "
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}'
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) -----
@upbeta01
upbeta01 / mkdir.sh
Created May 30, 2016 00:59
For laravel repo with .gitignore of the "storage" directory
#!/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