Skip to content

Instantly share code, notes, and snippets.

View poloey's full-sized avatar

Lict class gist poloey

View GitHub Profile
@poloey
poloey / mvc.php
Last active November 13, 2017 09:23
to create a basic boilerplate code using command line. anyone can create model, view, controller using this tool
<?php
/**
* to create mvc structure
* @return [void] [it will create whole mvc structure]
*/
function create_mvc_structure () {
if (! file_exists('core')) {
mkdir('core');
}
@poloey
poloey / rules.html
Created November 13, 2017 07:52
rules of exam
<!doctype html>
<html lang="en">
<head>
<title>Hello, world!</title>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Bootstrap CSS -->
@poloey
poloey / laravel_d_h.md
Last active January 8, 2018 23:47
ldh

deploying laravel in heroku

normal deploy

removing .env from .gitignore file

# to write Procfile
echo web: vendor/bin/heroku-php-apache2 public/ > Procfile
# to create heroku project
heroku create
# to set heroku app config
heroku config:set APP_KEY=$(php artisan --no-ansi key:generate --show)
@poloey
poloey / ram_in_ubunutu.txt
Created November 29, 2017 07:35
ram_in_ubunutu using command
sudo lshw -short -C memory
@poloey
poloey / data_from_2_table.txt
Created November 29, 2017 22:59
data from 2 table
select people.name as name, city.name as city from people inner
join city where people.id = city.person_id;
@poloey
poloey / bootstrapspacing.txt
Created December 4, 2017 17:10
bootstrap spacing in sass using for and each loop
/*
only sides
*/
$sides: (top, bottom, left, right);
@for $i from 1 through 8 {
@each $side in $sides {
.m#{str_slice($side, 0, 1)}-#{$i} {
margin-#{$side}: #{$i / 2}em ;
}
.p#{str_slice($side, 0, 1)}-#{$i} {
@poloey
poloey / .zshrc
Created December 15, 2017 10:49
zshrc
# If you come from bash you might have to change your $PATH.
#export PATH=$HOME/bin:$HOME/.config/composer/vendor/bin/:/usr/local/bin:$PATH
export PATH=$HOME/.config/composer/vendor/bin/:/opt/lampp/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH=/home/polo/.oh-my-zsh
# Set name of the theme to load. Optionally, if you set this to "random"
# it'll load a random theme each time that oh-my-zsh is loaded.
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
@poloey
poloey / sublimesetting.txt
Created December 19, 2017 17:17
sublime setting
{
"always_show_minimap_viewport": true,
"auto_complete_selector": "source, comment, text.plain, meta.tag, punctuation.definition.tag.begin, css",
"auto_complete_with_fields": true,
"auto_id_class": false,
"autoooooo_complete_commit_on_tab": true,
"bold_folder_labels": false,
"caret_extra_bottom": 0,
"caret_extra_top": 0,
"caret_extra_width": 2,
@poloey
poloey / gutter_color_sublime.txt
Created December 19, 2017 17:18
gutter color
{
"convert_path_in_windows" : "C:\\Program Files\\ImageMagick-6.9.4-Q8\\convert",
"convert_path" : "convert",
"fix_color_schemes" : true
}
@poloey
poloey / laravel_shared.txt
Created December 22, 2017 17:41
deploy laravel in shared hosting
1. make a <folder> as sibling of public_html
2. upload all laravel file to these <folder> except public directory
3. upload public directory contnet to public_html directory
4. now to go to `public_html` and edit index.html. autoload and app path tell all laravel file you keep inside `<folder>` which actually siblings of public_html
5. update .env configuration file
6. create a symlink for storage
~~~php
symlink('/home/topuph43alictpro/<folder>/storage/app/public', '/home/topuph43alictpro/public_html/storage/app/public');
~~~