Skip to content

Instantly share code, notes, and snippets.

View mamuz's full-sized avatar

Marco Muths mamuz

View GitHub Profile
| Region Code | Region Name |
| -------------- | ------------------------- |
| us-east-1 | US East (N. Virginia) |
| us-west-2 | US West (Oregon) |
| us-west-1 | US West (N. California) |
| eu-west-1 | EU (Ireland) |
| eu-central-1 | EU (Frankfurt) |
| ap-southeast-1 | Asia Pacific (Singapore) |
| ap-northeast-1 | Asia Pacific (Tokyo) |
| ap-southeast-2 | Asia Pacific (Sydney) |
| Key | Purpose |
| ----------------- | ---------------------------- |
| ctrl+alt+t | open new terminal window |
| ctrl+b % | split vertical |
| ctrl+b " | split horizontal |
| ctrl+b arrow keys | select split |
| ctrl+b x | close tab |
| ctrl+b c | open new tab |
| ctrl+b n | jump to next tab |
| ctrl+b p | jump to previous tab |
<leader> is ','
| Key (normal mode) | Purpose |
| ----------------- | ----------------------------------------- |
| ctrl+n | open file explorer |
| ctrl+w (twice) | jump to next split |
| ctrl+p | open file finder |
| / | enter search; turn off by <leader><space> |
| :qa | close all |
| :u | undo last step |
| Key | Purpose |
| ---------------------- | ------------------------------------- |
| alt+enter | solve problem / context-aware editing |
| ctrl+shift+a | find actions |
| ctrl+b | jump to definition |
| ctrl+g | jump to line |
| ctrl+alt+left OR right | navigate |
| ctrl+shift+v | open clipboard |
| ctrl+w | smart selection |
| ctrl+shit+w | smart deselection |
https://github.com/github/hub
http://nuclearsquid.com/writings/git-tricks-tips-workflows/
# create repo from working dir
git init
git create `basename "$PWD"` -d "any descr" # use -p for private repo
git add --all && git commit -m "inital commit" && git push origin master
# update
git fetch # update target branches from remote excepts the current branch
@mamuz
mamuz / .dockerignore
Last active March 12, 2017 13:17
global dockerignore
.DS_Store
Desktop.ini
.idea
*~
*.swp
._*
*.pyc
Thumbs.db
.Spotlight-V100
.Trashes
@mamuz
mamuz / Rename local and remote branch
Created August 24, 2015 09:00
git-rename-branch.sh
git branch -m old_branch new_branch # Rename branch locally
git push origin :old_branch # Delete the old branch
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote
@mamuz
mamuz / escapeShell.php
Last active December 16, 2015 18:00
Php functions to escape arguments for shell executes
<?php
escapeshellcmd();
escapeshellarg();
@mamuz
mamuz / tokenGenerator.php
Last active December 16, 2015 18:00
Secure token generator
<?php
$token = md5(
microtime() .
rand() .
serialize(shuffle($GLOBALS))
);
@mamuz
mamuz / secureRegEx
Last active December 16, 2015 18:00
RegExpressions to find vulnerabilities
# SQL-Injections
.*mysql_query\(.*\s*\$_(GET|POST|REQUEST|COOKIE)).*
# reflective xss
(echo|print).*\$_(GET|POST|COOKIE|REQUEST)