Skip to content

Instantly share code, notes, and snippets.

@jai-o
jai-o / useful-mac-terminal-commands.md
Last active April 29, 2020 04:04
Useful Mac Terminal Commands
  • Flush DNS: sudo killall -HUP mDNSResponder
  • Show permissions: stat -c '%a - %n' *
@jai-o
jai-o / git-config-commands.md
Created October 9, 2012 05:54
GIT: Config commands

GIT: Config commands

Typical configuration commands

git config --global user.name "Your Name"
git config --global user.email "example@example.com"

git config --global color.ui true

git config --global core.autocrlf input

@jai-o
jai-o / htaccess-try97
Created April 5, 2012 18:47
Works! Removes Index.php, Force HTTPS, removes www
RewriteEngine On
# Removes index.php
RewriteCond $1 !\.(gif|jpe?g|png)$ [NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php/$1
# Depends on your web host and setup, check with your web host specific settings
RewriteCond %{ENV:SECURE_REDIRECT} !=on
@jai-o
jai-o / mac-terminal-cmds.md
Created January 22, 2012 20:37
MAC: Useful Mac OSX Terminal commands

Useful Mac OSX Terminal commands

Change Finder to show Hidden Files

defaults write com.apple.finder AppleShowAllFiles TRUE
killall Finder

Change Finder to show Path

defaults write com.apple.finder _FXShowPosixPathInTitle -bool YES