Skip to content

Instantly share code, notes, and snippets.

View jackpinto's full-sized avatar

Jackson Pinto jackpinto

View GitHub Profile
@jackpinto
jackpinto / .bashrc
Last active December 15, 2015 22:09 — forked from henrik/.bashrc
# http://henrik.nyh.se/2008/12/git-dirty-prompt
# http://www.simplisticcomplexity.com/2008/03/13/show-your-git-branch-name-in-your-prompt/
# username@Machine ~/dev/dir[master]$ # clean working directory
# username@Machine ~/dev/dir[master*]$ # dirty working directory
function parse_git_dirty {
[[ $(git status 2> /dev/null | tail -n1) != "nothing to commit (working directory clean)" ]] && echo "*"
}
function parse_git_branch {
@jackpinto
jackpinto / Pattern para o Intellisense Visual Studio
Created January 29, 2014 14:34
Pattern usado pelo Visual Studio para lançar o intellisense
{}[]().,:;+-*/%&|^!~=<>?@#'"\
@jackpinto
jackpinto / Copia Nomes de Arquivo
Created February 14, 2014 18:57
Copia o nome de todos os arquivos de um diretorio para um arquivo
dir /b "C:\My Path" > myFiles.txt
@jackpinto
jackpinto / Install-Sublime.sh
Created March 9, 2014 00:50
Instala o Sublime 3
#!/bin/bash
add-apt-repository ppa:webupd8team/sublime-text-3
apt-get update
apt-get install sublime-text-installer
@jackpinto
jackpinto / sublime-scope-definition
Created March 9, 2014 16:34
Sublime Text Scope Definition
ActionScript: source.actionscript.2
AppleScript: source.applescript
ASP: source.asp
Batch FIle: source.dosbatch
C#: source.cs
C++: source.c++
Clojure: source.clojure
CoffeeScript: source.coffee
CSS: source.css
D: source.d
@jackpinto
jackpinto / Default (Windows).sublime-keymap
Last active August 29, 2015 13:59
Configurações do SublimeText
[
{
"keys": [
"alt+shift+up"
],
"command": "select_lines",
"args": {
"forward": false
}
},
<snippet>
<content><![CDATA[
btn:b.btn.btn-${1:default}
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>bbutton</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<scope>text.html</scope>
</snippet>
<snippet>
<content><![CDATA[
inject(['${1:dependency}',
function(${2:param}) {
${3:expect(true).toBe(true);}
}
])
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>inject</tabTrigger>
@jackpinto
jackpinto / set-grub-for-hyperv
Created December 12, 2014 22:03
Running full screen for ubuntu in Hyper-V 2012
Edit the grub configuration file, for example:
sudo vi /etc/default/grub
Find the line starting with GRUB_CMDLINE_LINUX_DEFAULT, and add "video=hyperv_fb:1680x1050" (or your custom resolution) in between the quotes. For example:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash video=hyperv_fb:1680x1050"
Save and exit
Run
sudo update-grub
Restart your computer
@jackpinto
jackpinto / verify-transaction
Created February 12, 2015 17:42
Verifica as Transações abertas para um dado processo
SELECT open_tran FROM master.sys.sysprocesses WHERE SPID=62
go