Skip to content

Instantly share code, notes, and snippets.

View poloey's full-sized avatar

Lict class gist poloey

View GitHub Profile
@poloey
poloey / mysql_backup_ubuntu.txt
Created March 17, 2018 10:03
mysql database backup ubuntu
-- MySQL dump 10.16 Distrib 10.1.30-MariaDB, for debian-linux-gnu (x86_64)
--
-- Host: localhost Database: mysql
-- ------------------------------------------------------
-- Server version 10.1.30-MariaDB-0ubuntu0.17.10.1
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
@poloey
poloey / laravel_crud
Created March 10, 2018 18:27
laravel_crud
Installing laravel
describing route model view controller
showing folder structure with factory and migration
artisan command
php artisan make:model make:controller make:factory make:migration
git include
php artisan make:model Post -a (but I won't do that, do later)
crud
--------
@poloey
poloey / sublime.txt
Created March 10, 2018 16:13
sublime_essential_plugin for web
ctrl + shift + p
# file and folder manipulation
====================
sidebar enhancement
advanced new file
# completion
===========
@poloey
poloey / display_scale_in_ubuntu.txt
Last active March 8, 2018 20:09
display_scale_in_ubuntu.txt
gsettings set org.gnome.desktop.interface text-scaling-factor 1.75
@poloey
poloey / mysql_date_format_from_javascript.js
Created February 25, 2018 19:26
mysql_date_format_from_javascript
function str_pad(n) {
return String("00" + n).slice(-2);
}
var dateObj = new Date();
var month = str_pad( dateObj.getUTCMonth() + 1);
var day = str_pad(dateObj.getUTCDate() + 1);
var year = dateObj.getUTCFullYear();
newdate = year + "-" + month + "-" + day;
@poloey
poloey / file_upload_in_laravel_with_unlink.php
Created February 20, 2018 20:18
file_upload_in_laravel_with_unlink
@poloey
poloey / laravel_materialize_pagination.blade.php
Created February 20, 2018 20:17
laravel materialize pagination
@if ($paginator->hasPages())
<ul class="pagination">
{{-- Previous Page Link --}}
@if ($paginator->onFirstPage())
<li class="disabled"><i class="material-icons">chevron_left</i></li>
@else
<li class="waves-effect"><a href="{{ $paginator->previousPageUrl() }}"><i class="material-icons">chevron_left</i></a></li>
@endif
{{-- Pagination Elements --}}
@poloey
poloey / htaccess for rewrite all request except media file.txt
Created February 15, 2018 06:58
rewrite htaccess for rewrite all request except media file
Options +FollowSymLinks -MultiViews
RewriteEngine On
# Redirect requests to index.php
RewriteCond %{REQUEST_URI} !=/index.php
RewriteCond %{REQUEST_URI} !.*\.png$ [NC]
RewriteCond %{REQUEST_URI} !.*\.jpg$ [NC]
RewriteCond %{REQUEST_URI} !.*\.css$ [NC]
RewriteCond %{REQUEST_URI} !.*\.gif$ [NC]
RewriteCond %{REQUEST_URI} !.*\.js$ [NC]
@poloey
poloey / cls_command_for_hyper.txt
Created February 8, 2018 00:18
cls command for hyper
alias cls="echo -e '\\0033\\0143'"
I can use reset. which also working fine
@poloey
poloey / htaccess_for_clean_routing.txt
Created January 23, 2018 08:21
.htaccess for clean routing
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ index.php [NC,L]