Skip to content

Instantly share code, notes, and snippets.

View edisplay's full-sized avatar

edisplay edisplay

View GitHub Profile
@edisplay
edisplay / init.vim
Created November 27, 2020 03:49 — forked from benawad/init.vim
" Specify a directory for plugins
call plug#begin('~/.vim/plugged')
Plug 'neoclide/coc.nvim', {'branch': 'release'}
Plug 'scrooloose/nerdtree'
"Plug 'tsony-tsonev/nerdtree-git-plugin'
Plug 'Xuyuanp/nerdtree-git-plugin'
Plug 'tiagofumo/vim-nerdtree-syntax-highlight'
Plug 'ryanoasis/vim-devicons'
Plug 'airblade/vim-gitgutter'
@edisplay
edisplay / init.vim
Created November 27, 2020 03:49 — forked from benawad/init.vim
" Specify a directory for plugins
call plug#begin('~/.vim/plugged')
Plug 'neoclide/coc.nvim', {'branch': 'release'}
Plug 'scrooloose/nerdtree'
"Plug 'tsony-tsonev/nerdtree-git-plugin'
Plug 'Xuyuanp/nerdtree-git-plugin'
Plug 'tiagofumo/vim-nerdtree-syntax-highlight'
Plug 'ryanoasis/vim-devicons'
Plug 'airblade/vim-gitgutter'
@edisplay
edisplay / _webserver.md
Created September 18, 2019 17:03 — forked from jgravois/_webserver.md
a simple guide for getting a local web server set up

Do I have a web server running?


having a web server turned on doesn't necessarily mean you are serving pages on the world wide web. its what allows you to load your own static files (.html, .js etc.) in a browser via http://.

if you're not sure whether or not you have a web server running, no problem! its easy to confirm.

what happens when you visit http://localhost/?

@edisplay
edisplay / README.md
Created August 9, 2019 17:40 — forked from hofmannsven/README.md
Git Cheatsheet
@edisplay
edisplay / git_commands.sh
Created August 9, 2019 17:31 — forked from olegafx/git_commands.sh
Useful git commands
# Save branch history and revert easily
git merge --no-ff
git revert -m 1 <hash>
# Show n lines of context around diff lines instead of the usual +/- 3
git diff -U<n>
# Check which branches are merged
git branch --merged
@edisplay
edisplay / xampp_php7_xdebug.md
Created August 5, 2019 14:26 — forked from odan/xampp_php7_xdebug.md
Installing Xdebug for XAMPP

Installing Xdebug for XAMPP with PHP 7.x

Requirements

Setup

@edisplay
edisplay / README.md
Created June 28, 2019 16:02 — forked from tomazzaman/README.md
Gulp workflow for WordPress theme development

Gulp workflow for WordPress theme development

Requirements

In order for Livereload to work, you need a Firefox or Chrome extension as Gulp doesn't inset it automatically. Alternatively, you can also manually put the livereload script in footer.php, just make sure to insert it only on development environment:

<script>document.write('<script src="http://' + (location.host || 'localhost').split(':')[0] + ':35729/livereload.js?snipver=1"></' + 'script>')</script>
@edisplay
edisplay / wordpress-multisite-internal-redirect-loop.md
Created March 20, 2019 20:35 — forked from JustThomas/wordpress-multisite-internal-redirect-loop.md
WordPress Multisite: How to fix error "too many redirects"

WordPress Multisite: How to fix error "Request exceeded the limit of 10 internal redirects"

I am running a WordPress multisite network with sub-directory setup. When I check my error.log file, it is full of entries like this one:

Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'Limit InternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.

The problem was, in my case, one specific rewrite rule in the .htaccess file.

Problem description

// ********************************************************
// Obtain the base font-size for current page
var baseFontSize = jQuery('body').css('font-size');
console.log(baseFontSize);
// or
jQuery('body').css('font-size');
// ********************************************************
@edisplay
edisplay / git.sh
Created December 28, 2017 13:44 — forked from etoxin/git.md
GIT Bash Commands
# search (regex)
git grep "regex"
# list all branches
git branch -a
# list remote branches
git branch -r
# checkout an branch on remote