Skip to content

Instantly share code, notes, and snippets.

@MikeDre
MikeDre / prepare-commit-msg.sh
Last active October 24, 2019 13:25 — forked from bartoszmajsak/prepare-commit-msg.sh
How to automatically prepend git commit with a branch name
#!/bin/bash
# This way you can customize which branches should be skipped when
# prepending commit message.
if [ -z "$BRANCHES_TO_SKIP" ]; then
BRANCHES_TO_SKIP=(develop test)
fi
BRANCH_NAME=$(git symbolic-ref --short HEAD)
BRANCH_NAME="${BRANCH_NAME##*/}"
@MikeDre
MikeDre / clean_code.md
Created February 8, 2019 12:00 — forked from wojteklu/clean_code.md
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

@MikeDre
MikeDre / css-media-queries-cheat-sheet.css
Created January 29, 2019 11:14 — forked from bartholomej/css-media-queries-cheat-sheet.css
CSS Media Query Cheat Sheet (with Foundation)
/*------------------------------------------
Responsive Grid Media Queries - 1280, 1024, 768, 480
1280-1024 - desktop (default grid)
1024-768 - tablet landscape
768-480 - tablet
480-less - phone landscape & smaller
--------------------------------------------*/
@media all and (min-width: 1024px) and (max-width: 1280px) { }
@media all and (min-width: 768px) and (max-width: 1024px) { }
@MikeDre
MikeDre / Update remote rep.md
Last active January 8, 2019 17:28 — forked from mandiwise/Update remote repo
Transfer repo from Bitbucket to Github
@MikeDre
MikeDre / sublime_text_3_shortcut_osx.textile
Last active October 2, 2018 09:20 — forked from faizshukri/sublime_text_3_shortcut_osx.textile
Sublime Text 3 Shortcut for OSX

Keyboard Shortcuts for Sublime Text 3- OSX

Editing

Keypress Command
⌘ + X Delete line
⌘ + ↩ Insert line after
⌘ + ⇧ + ↩ Insert line before
⌘ + ⌃ + ↑ Move line/selection up
⌘ + ⌃ + ↓ Move line/selection down
@MikeDre
MikeDre / iterm2.md
Created October 2, 2018 09:05 — forked from squarism/iterm2.md
iterm2 cheatsheet

Tabs and Windows

Function Shortcut
Fullscreen + Enter
Previous Tab + Left Arrow
Next Tab + Right Arrow
Go to Tab + Number
Go to Window + Option + Number
Go to Split Pane by Direction + Option + Arrow