Skip to content

Instantly share code, notes, and snippets.

View anselmdk's full-sized avatar

Anselm Christophersen anselmdk

View GitHub Profile
@anselmdk
anselmdk / readme.md
Last active November 14, 2016 12:20
Wordpress Cheat Sheet

Wordpress cheat sheet

Create test user

INSERT INTO `databasename`.`wp_users` (`ID`, `user_login`, `user_pass`, `user_nicename`, `user_email`, `user_url`, `user_registered`, `user_activation_key`, `user_status`, `display_name`) VALUES ('1000', 'anselm', MD5('anselm'), 'AC', 'ac@cphcloud.com', '', '2011-06-07 00:00:00', '', '0', 'AC');
INSERT INTO `databasename`.`wp_usermeta` (`umeta_id`, `user_id`, `meta_key`, `meta_value`) VALUES (NULL, '1000', 'wp_capabilities', 'a:1:{s:13:"administrator";s:1:"1";}');
INSERT INTO `databasename`.`wp_usermeta` (`umeta_id`, `user_id`, `meta_key`, `meta_value`) VALUES (NULL, '1000', 'wp_user_level', '10');
@anselmdk
anselmdk / branches.md
Last active November 14, 2016 22:23
Git Cheat Sheet

Branches

Deletion

git branch -d local-branch
@anselmdk
anselmdk / es6-classes.md
Last active December 20, 2016 11:37
JavaScript Cheat Sheet

ES6 Classes

Parent:

class Parent {
  constructor(vars) {
    //doing some grown up stuff
  }
}
@anselmdk
anselmdk / vim-cheatsheet.md
Last active January 30, 2017 09:04
VIM Cheatsheet

VIM Cheat Sheet

Description  Command
Up, down, left right k, j, h, l
Jump words (& back) w, b
 End/beginning of line $, ^/0
End/beginning of file G, gg
Line numbers set number
@anselmdk
anselmdk / 0.REAME-Hosting-Cheat-Sheet.md
Last active January 30, 2017 09:14
Hosting Cheat Sheet

A collection of notes related to hosting

@anselmdk
anselmdk / vagrant.md
Last active March 1, 2017 22:29
Vagrant
@anselmdk
anselmdk / .profile.md
Last active March 1, 2017 22:33
Stuff that should go in the .profile file

Git auto completion

_From this SO answer

  1. Download the file to your home directory:
curl https://raw.githubusercontent.com/git/git/master/contrib/completion/git-completion.bash -o ~/.git-completion.bash
  1. Add to your .profile file:
@anselmdk
anselmdk / readme.md
Last active April 19, 2017 11:05
SSH Cheat Sheet

SSH

Continue running a command also when the connection drops

screen
# when returning, run:
screen -x

# also: