Skip to content

Instantly share code, notes, and snippets.

View hectorromo's full-sized avatar

Hector Romo hectorromo

View GitHub Profile
@hectorromo
hectorromo / git_overwrite_branch
Created March 15, 2020 03:17 — forked from rgbink/git_overwrite_branch
Completely Overwrite chosen git branch
git checkout desired_branch // put in the name of the branch you wish to KEEP
git merge -s ours branch_to_be_replaced // put in the name of the branch you want to OVERWRITE
git checkout branch_to_be_replaced // put in the name of the branch you want to OVERWRITE
git merge desired_branch // put in the name of the branch you wish to KEEP
Seven different types of CSS attribute selectors
// This attribute exists on the element
[value]
// This attribute has a specific value of cool
[value='cool']
// This attribute value contains the word cool somewhere in it
[value*='cool']
@hectorromo
hectorromo / web-servers.md
Created February 3, 2020 14:05 — forked from willurd/web-servers.md
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@hectorromo
hectorromo / config.php
Created July 5, 2018 15:27 — forked from andreasnymark/config.php
Kirby file upload
/**
* File upload
*
*
**/
array(
'pattern' => 'ajax/fileupload',
'method' => 'POST',
'action' => function () {
$site = site();
@hectorromo
hectorromo / .vimrc
Created June 6, 2018 11:27 — forked from JeffreyWay/.vimrc
My .vimrc file
set nocompatible " Disable vi-compatibility
set t_Co=256
colorscheme xoria256
set guifont=menlo\ for\ powerline:h16
set guioptions-=T " Removes top toolbar
set guioptions-=r " Removes right hand scroll bar
set go-=L " Removes left hand scroll bar
set linespace=15
wp core download
wp core config --dbname=$1 --dbuser=root --dbpass=root --dbhost=localhost --extra-php <<PHP
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
PHP
wp db create
wp core install --url=http://$1.com --title=$1 --admin_user=admin --admin_password=password --admin_email=admin@$1.com