Skip to content

Instantly share code, notes, and snippets.

💭
Always working but happy to talk 👍

Aslam Doctor aslamdoctor

💭
Always working but happy to talk 👍
Block or report user

Report or block aslamdoctor

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@aslamdoctor
aslamdoctor / margin-padding-helper.scss
Created Mar 26, 2020
Sass Margin / Padding Helper
View margin-padding-helper.scss
// Variables
$spacing-top:160px;
$spacing-bottom:160px;
// Mixins
@mixin paddings($top:$spacing-top, $bottom:$spacing-bottom){
padding-top:$top;
padding-bottom:$bottom;
}
@mixin margins($top:$spacing-top, $bottom:$spacing-bottom){
@aslamdoctor
aslamdoctor / ci-pagination.php
Created Feb 27, 2020
Codeigniter Pagination
View ci-pagination.php
<?php
// new pagination here
$this->load->library('pagination');
$total_records = count($total);
$paging_config['base_url'] = base_url(uri_string()).'?sort='.$sort;
$paging_config['total_rows'] = $total_records;
$paging_config['per_page'] = 24;
$paging_config['num_links'] = 5;
$paging_config['page_query_string'] = TRUE;
$paging_config['use_page_numbers'] = TRUE;
@aslamdoctor
aslamdoctor / ContextCmder-Disable.reg
Created Feb 7, 2020 — forked from jojobyte/ContextCmder-Disable.reg
Cmder Context (Right-Click) Menu for Windows 7, 8 & 10
View ContextCmder-Disable.reg
Windows Registry Editor Version 5.00
[-HKEY_CLASSES_ROOT\Directory\Background\shell\Cmder]
[-HKEY_CLASSES_ROOT\Directory\shell\Cmder]
@aslamdoctor
aslamdoctor / EloquentCheatSheet.md
Created Dec 27, 2019 — forked from avataru/EloquentCheatSheet.md
Laravel : Eloquent relationships cheat sheet
View EloquentCheatSheet.md
@aslamdoctor
aslamdoctor / pm2-nuxt.sh
Last active Dec 17, 2019
PM2 Commands for Nuxt
View pm2-nuxt.sh
npm run build
pm2 start npm -- start # original command
pm2 start npm --name "aslam" -- start # naming the process
# once you name the proces, you can simple do 'pm2 start aslam' and 'pm2 stop aslam'
# other useful commands
pm2 delete all
pm2 stop process_name
@aslamdoctor
aslamdoctor / nginx-nuxt-wordpress-config
Last active Dec 29, 2019
nginx configurations for Nuxt + WordPress
View nginx-nuxt-wordpress-config
map $sent_http_content_type $expires {
"text/html" epoch;
"text/html; charset=utf-8" epoch;
default off;
}
server {
listen 80;
listen [::]:80;
@aslamdoctor
aslamdoctor / laravel-json-orderby.php
Created Nov 27, 2019
Laravel : Maintain Sort order in JSON Response
View laravel-json-orderby.php
<?php
$user = $request->user();
$submissions = $user->submissions;
// do these in the end
$submissions = $submissions->sortByDesc(function($submission){
return $submission->created_at;
});
$submissions = array_values($submissions->toArray());
@aslamdoctor
aslamdoctor / wsl-lamp.md
Last active Mar 16, 2020
Windows 10 - WSL LAMP Stack Setup
View wsl-lamp.md
@aslamdoctor
aslamdoctor / wp-list-thumbnail-sizes.php
Created Oct 4, 2019
Wordpress - List thumbnail sizes available
View wp-list-thumbnail-sizes.php
<?php
global $_wp_additional_image_sizes;
print '<pre>';
print_r( $_wp_additional_image_sizes );
print '</pre>';
?>
@aslamdoctor
aslamdoctor / wp-plugin-svn-commands.md
Last active Sep 17, 2019
Wordpress Plugin SVN Commands
View wp-plugin-svn-commands.md

To Clone Repo:

svn co https://plugins.svn.wordpress.org/your-plugin-name my-local-dir

To Commit & Push Repo:

cd my-local-dir
svn add trunk/*
svn ci -m 'Adding first version of my plugin'
You can’t perform that action at this time.