Skip to content

Instantly share code, notes, and snippets.

@wizioo
wizioo / .bashrc
Last active January 28, 2016 09:24
Deploy laravel 5 app to OVH Pro mutualised server
# User specific aliases and functions
alias php='/usr/local/php5.6/bin/php'
alias composer='php ~/composer.phar'
@wizioo
wizioo / gitignore_per_git_branch.md
Last active May 9, 2024 10:22
HowTo have specific .gitignore for each git branch

How to have specific .gitignore for each git branch

Objective

My objective is to have some production files ignored on specific branches. Git doesn't allow to do it.

Solution

My solution is to make a general .gitignore file and add .gitignore.branch_name files for the branches I want to add specific file exclusion. I'll use post-checkout hook to copy those .gitignore.branch_name in place of .git/info/exclude each time I go to the branch with git checkout branch_name.

@wizioo
wizioo / DefaultKeyBinding.dict
Last active January 7, 2016 15:27
Use Windows Behaviour for Home and End Keys on OSX keyboard
{
/*
Shift : \
Ctrl : ^
Alt : ~
Cmd : @
More at: http://osxnotes.net/keybindings.html
*/
"\UF729" = moveToBeginningOfParagraph:; // home
"\UF72B" = moveToEndOfParagraph:; // end
@wizioo
wizioo / Change User Folder Location in OSX after reinstall.md
Last active January 4, 2016 16:15
Change User Folder Location in OSX after reinstall

Change User Folder Location in OSX after reinstall

Needs

This tutorial is for the ones who want to use an older User folder in OSX after reinstall. My personal use was that I had the OSX 10.10 Yosemite installed with Personal User folder located on a different drive. I decided to start with a clean OSX 10.11 El Capitan install (not an upgrade). So this tutorial begin after the clean install has been done.

Steps

@wizioo
wizioo / Mount Network Drive on OSX Startup.md
Last active January 5, 2016 08:59
Mount Network Drive on OSX Startup

#How to Automount network drive on osx startup using Automator

##Step 1: Create an Automator app that connects to your network drive

  1. Launch Automator.
  2. Choose Application from the new document dialogue.
  3. In the search field enter pause.
  4. Drag the pause action from the results to the right pane.
  5. Enter 10 seconds to slightly delay the connection attempt to ensure your network connection (wi-fi or otherwise) is ready.
  6. Do a search for server in the search field.
@wizioo
wizioo / OSX.sublime-keymap
Last active August 29, 2015 14:21
Key binding in Sublime text for OSX with keyboard including Numeric keys (sublime keymap)
[
{ "keys": ["end"], "command": "move_to", "args": { "to": "eol" } },
{ "keys": ["home"], "command": "move_to", "args": { "to": "bol" } },
{ "keys": ["shift+end"], "command": "move_to", "args": { "to": "eol", "extend": true } },
{ "keys": ["shift+home"], "command": "move_to", "args": { "to": "bol", "extend": true } },
{ "keys": ["ctrl+end"], "command": "move_to", "args": { "to": "eof" } },
{ "keys": ["ctrl+home"], "command": "move_to", "args": { "to": "bof" } },
{ "keys": ["ctrl+shift+end"], "command": "move_to", "args": { "to": "eof", "extend": true } },
{ "keys": ["ctrl+shift+home"], "command": "move_to", "args": { "to": "bof", "extend": true } },
]