Skip to content

Instantly share code, notes, and snippets.

View blattmann's full-sized avatar
🏠
Working from home

Stefan Blattmann blattmann

🏠
Working from home
View GitHub Profile
@blattmann
blattmann / gist:95d9aa65fbf8a4534f8b
Created November 12, 2015 07:55 — forked from francoishill/gist:6483997
Media queries for mobile devices - Requires at least requires the meta viewport tag with content 'width=device-width'
/*http://i-skool.co.uk/mobile-development/web-design-for-mobiles-and-tablets-viewport-sizes/*/
/*At least requires the meta viewport tag with content 'width=device-width'*/
@media only screen and (max-width: 1080px) and (orientation : portrait) {
/* PORTRAIT:
Windows Surface Pro*/
}
@media only screen and (max-width: 800px) and (orientation : portrait) {
/* PORTRAIT:
Acer Iconia Tab A100
[core]
excludesfile = /Users/sblat1/.gitignore_global
[difftool "sourcetree"]
cmd = opendiff \"$LOCAL\" \"$REMOTE\"
path =
[mergetool "sourcetree"]
cmd = /Applications/SourceTree.app/Contents/Resources/opendiff-w.sh \"$LOCAL\" \"$REMOTE\" -ancestor \"$BASE\" -merge \"$MERGED\"
trustExitCode = true
[user]
name = NAME LASTNAME

Mac OSX fresh setup for Front End Developers

General setup

Lines starting with $ mean: You have to paste that stuff in your terminal and execute it (without the $ sign)

  • Display hidden files and folders: $ defaults write com.apple.finder AppleShowAllFiles TRUE;killall Finder
  • Always show Library folder: $ chflags nohidden ~/Library/

Homebrew

  • Install Homebrew: $ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
@blattmann
blattmann / bash_gitprompt
Created July 20, 2016 12:20 — forked from DanielaValero/bash_gitprompt
git in prompt
#======= Config to see git branch in the prompt
#===== get current git branch name
function git_branch {
export gitbranch=[$(git rev-parse --abbrev-ref HEAD 2>/dev/null)]
if [ "$?" -ne 0 ]
then gitbranch=
fi
if [[ "${gitbranch}" == "[]" ]]
@blattmann
blattmann / gist:25d26c4608cc0728063fef053d11700d
Created August 1, 2016 10:48 — forked from chrissimpkins/gist:5bf5686bae86b8129bee
Atom Editor Cheat Sheet (Sweetmeat)

Use these rapid keyboard shortcuts to control the GitHub Atom text editor on Mac OSX.

Key to the Keys

  • ⌘ : Command key
  • ⌃ : Control key
  • ⌫ : Delete key
  • ← : Left arrow key
  • → : Right arrow key
  • ↑ : Up arrow key
@blattmann
blattmann / facebookInvite.md
Last active March 9, 2021 10:18
Invite Facebook friends
@blattmann
blattmann / pr_update.md
Last active October 18, 2016 06:41
Update a pull request
@blattmann
blattmann / js
Last active February 3, 2017 09:35
angularjs-gulp-example
var gulp = require('gulp'),
webserver = require('gulp-webserver'),
del = require('del'),
sass = require('gulp-sass'),
karma = require('gulp-karma'),
jshint = require('gulp-jshint'),
sourcemaps = require('gulp-sourcemaps'),
spritesmith = require('gulp.spritesmith'),
browserify = require('browserify'),
source = require('vinyl-source-stream'),

Install with Homebrew

brew install mongodb

Set up launchctl to auto start mongod

$ ln -sfv /usr/local/opt/mongodb/*.plist ~/Library/LaunchAgents

/usr/local/opt/mongodb/ is a symlink to /usr/local/Cellar/mongodb/x.y.z (e.g., 2.4.9)

@blattmann
blattmann / gist:6e06f1a313fcdeef4646b96125d5863d
Created March 1, 2017 19:52 — forked from paulallies/gist:0052fab554b14bbfa3ef
Remove node_modules from git repo
#add 'node_modules' to .gitignore file
git rm -r --cached node_modules
git commit -m 'Remove the now ignored directory node_modules'
git push origin master