Skip to content

Instantly share code, notes, and snippets.

View pinoywebs123's full-sized avatar
🏠
I love to learn more and more.

Morley Abuyabor Jr pinoywebs123

🏠
I love to learn more and more.
View GitHub Profile
@pinoywebs123
pinoywebs123 / upload image
Created February 11, 2019 12:27
upload image
$this->validate($request, [
'image'=> 'image|mimes:jpeg,jpg,png,gif|required|max:10000'
]);
$image = $request->file('image');
$name = time().'.'.$image->getClientOriginalExtension();
$destinationPath = public_path('/images');
$image->move($destinationPath, $name);
@pinoywebs123
pinoywebs123 / docker-help.md
Created April 9, 2019 11:55 — forked from bradtraversy/docker-help.md
Docker Commands, Help & Tips

Docker Commands, Help & Tips

Show commands & management commands

$ docker

Docker version info

@pinoywebs123
pinoywebs123 / deployment_guide.md
Created May 3, 2019 13:26 — forked from vicgonvt/deployment_guide.md
Deployment Guide for Ubuntu Server from Scratch with Laravel

Setting Up Laravel in Ubuntu / DigitalOcean

Getting Started

  • Create droplet with Ubuntu 18.10
  • ssh root@[DROPLET IP ADDRESS]
  • Get password from your email
  • Change password on first login
  • adduser laravel
  • Enter password and other information
# This is a sample build configuration for PHP.
# Check our guides at https://confluence.atlassian.com/x/e8YWN for more examples.
# Only use spaces to indent your .yml configuration.
# You can specify a custom docker image from Docker Hub as your build environment.
# run composer check-platform-reqs for a list of required extensions.
image: php:7.2-fpm
pipelines:
default:
# Not needed unless you're doing feature tests.
# - step:
@pinoywebs123
pinoywebs123 / gist:1b9151f9dba06cafbd470712c149dd3a
Last active June 18, 2019 10:30
one signal and iOS etc....
https://documentation.onesignal.com/docs/ionic-sdk-setup
https://documentation.onesignal.com/docs/generate-an-ios-push-certificate
brew install imagemagick
find ./resources/ -name "*.png" -exec convert "{}" -alpha off "{}" \;
Provision problem in HS
@pinoywebs123
pinoywebs123 / moment-js-timezones.txt
Created March 13, 2020 13:30 — forked from diogocapela/moment-js-timezones.txt
List of All Moment.js Timezones
Africa/Abidjan
Africa/Accra
Africa/Addis_Ababa
Africa/Algiers
Africa/Asmara
Africa/Asmera
Africa/Bamako
Africa/Bangui
Africa/Banjul
Africa/Bissau
@pinoywebs123
pinoywebs123 / error.php
Created July 6, 2020 15:42
Error Handling
//load the library Custom class
$this->load->library('ErrorHandler');
//store db error to variable
$db_error = $this->db->error();
//use the library method and catch the error message
echo $var = $this->errorhandler->get_error($db_error['message']);
//exit
__________________________
Setup LAMP_________________________
- sudo apt update
- sudo apt install -y git curl wget zip unzip
- sudo apt install apache2
- sudo systemctl status apache2
- sudo ufw allow in "Apache Full"
- sudo a2enmod rewrite - for routes
- sudo systemctl restart apache2
- sudo apt install mysql-server - mysql