A list of useful gists from my gist account.
Setup sourcetree as your git client
- Download and install sourcetree
- Open sourcetree and then go to Tools -> Options -> Diff tab -> Set both Diff and Merge
tools to
TortoiseMerge - Download and install TortoiseSVN. It will contain the merge tool we need.
- Find the place where you installed TortoiseSVN (usually
C:\Program Files\TortoiseSVN) - Add the bin folder from there to your system path
C:\Program Files\TortoiseSVN\bin. To edit on windows 7 go to Start -> Searchvariables(Edit environment variables)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| FILE=$1 | |
| # make sure the file exists | |
| if [ ! -f "$FILE" ] | |
| then | |
| echo -e "\x07File $1 doesn't exists !" | |
| exit | |
| fi |
I needed to install ubuntu server 12.04 32bit on my virtual box.
Here are the steps to install:
- Download and install virtual box: https://www.virtualbox.org/wiki/Downloads
- Download and install the ubuntu iso: http://releases.ubuntu.com/12.04/
- Make a new virtual machine with the default settings and change:
- on the network tab select
Bridged Adapterto be able to connect to it via ssh
Note: a step by step process is available in this video
- on the network tab select
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| start livereload . | |
| start sass --watch styles/styles.scss:styles/styles.css | |
| start http-server |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var matchText = (function() { | |
| var excludeElements = ['script', 'style', 'iframe', 'canvas']; | |
| var mText = function(node, regex, callback) { | |
| var child = node.firstChild; | |
| var correctOffset = 0; | |
| // if it's an empty element | |
| if ( ! child) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| :: redirects `egrep` to `sh egrep` | |
| @echo off | |
| sh egrep %* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // 1. Run npm install grunt-contrib-watch --save | |
| // 2. Add this in your Gruntfile.js file | |
| grunt.loadNpmTasks('grunt-contrib-watch'); | |
| // 3. add this to your watch.js file | |
| livereload: { | |
| options: { livereload: true }, | |
| files: ['build/**/*.js', 'build/**/*.css'], | |
| tasks: [] | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Mihai Ionut Vilcu | |
| # Nov 2014 | |
| # Get the js functions names at the cursor position | |
| # | |
| import sublime, sublime_plugin | |
| from time import time | |
| _last_run = 0 |