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
@callumlocke
callumlocke / .zshrc
Last active March 24, 2024 08:12
ZSH function to auto-switch to correct Node version
####
# ZSH function to auto-switch to correct Node version
# https://gist.github.com/callumlocke/30990e247e52ab6ac1aa98e5f0e5bbf5
#
# - Searches up your directory tree for the closest .nvmrc, just like `nvm use` does.
#
# - If you are already on the right Node version, IT DOES NOTHING, AND PRINTS NOTHING.
#
# - Works correctly if your .nvmrc file contains something relaxed/generic,
# like "4" or "v12.0" or "stable".

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)"
@DanielaValero
DanielaValero / bash_gitprompt
Last active July 20, 2016 12:20
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}" == "[]" ]]
[Alias]
st = status
ci = commit
cl = clone
br = branch
co = checkout
df = diff
dc = diff --cached
#resets
rh = reset --hard
@DanielaValero
DanielaValero / gist:eb3d009a9b5f02e7bd80
Last active July 18, 2016 13:27
Software for Mac
# Browsers
Firefox developer
chrome canary
Firefox
chrome
# Tools
Virtual Box - Modern IE
xcode
grunt gulp babel bower grunt-cli csslint eslint generator-generator grunt-init gulp-cli jscs jshint jsxhint mocha mocha-phantomjs node-inspector node-static purify-css scss-lint underscore lodash vorlon webpack webpack-dev-server yo node-scss-lint sass scss-lint
@nicolasembleton
nicolasembleton / restart_bluetooth.sh
Last active October 21, 2022 20:10
Restart Bluetooth Daemon on Mac OS X without restarting
#!/bin/bash
sudo kextunload -b com.apple.iokit.BroadcomBluetoothHostControllerUSBTransport
sudo kextload -b com.apple.iokit.BroadcomBluetoothHostControllerUSBTransport