Skip to content

Instantly share code, notes, and snippets.

View adelarsq's full-sized avatar
🐢
I may be really slow to respond.

Adelar da Silva Queiróz adelarsq

🐢
I may be really slow to respond.
View GitHub Profile
@scrooloose
scrooloose / git_menu.vim
Created October 9, 2009 06:21
An example git menu for nerdtree... very raw
" Put this in ~/.vim/nerdtree_plugin/git_menu.vim
"
" Adds a "g" submenu to the NERD tree menu.
"
" Note: this plugin assumes that the current tree root has a .git dir under
" it, and that the working tree and the .git repo are in the same place
"
if exists("g:loaded_nerdtree_git_menu")
finish
endif
!function() {
var doc = document,
htm = doc.documentElement,
lct = null, // last click target
nearest = function(elm, tag) {
while (elm && elm.nodeName != tag) {
elm = elm.parentNode;
}
return elm;
};
@masaakif
masaakif / grep_menuitem.vim
Last active October 28, 2022 13:28 — forked from scrooloose/grep_menuitem.vim
nerdtree menu plugin to grep under selected directory. : Forked from http://gist.github.com/205807
"shove this in ~/.vim/nerdtree_plugin/grep_menuitem.vim
"
" Add 'g' menu items to grep under selected directory.
" 'g' : prompts the user to type search pattern under selected dir.
" use parent directory if file is selected.
" This uses ':grep'.
"
" For ripgrep user,
" NERDTreeRipGrepDirectory function is much, much faster.
" Requirements:
package com.demo;
//
// Demonstrates what appears to be a bug in smooth line drawing on the Android Emulator.
//
// This code works on a G1 and also JOGL on Windows,
// but the line widths vary depending on endpoint location on the emulator.
// This code will work on the emulator if line smoothing is turned off.
// See http://gist.github.com/523961 for the other class (the renderer)
@isaacs
isaacs / node-and-npm-in-30-seconds.sh
Last active May 16, 2024 16:51
Use one of these techniques to install node and npm without having to sudo. Discussed in more detail at http://joyeur.com/2010/12/10/installing-node-and-npm/ Note: npm >=0.3 is *safer* when using sudo.
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=~/local
make install # ok, fine, this step probably takes more than 30 seconds...
curl https://www.npmjs.org/install.sh | sh
@mxcl
mxcl / uninstall_homebrew.sh
Created August 26, 2011 11:25
Uninstall Homebrew
#!/bin/sh
# Just copy and paste the lines below (all at once, it won't work line by line!)
# MAKE SURE YOU ARE HAPPY WITH WHAT IT DOES FIRST! THERE IS NO WARRANTY!
function abort {
echo "$1"
exit 1
}
set -e

A good commit message looks like this:

Header line: explaining the commit in one line

Body of commit message is a few lines of text, explaining things
in more detail, possibly giving some background about the issue
being fixed, etc etc.

The body of the commit message can be several paragraphs, and
please do proper word-wrap and keep columns shorter than about
@qrush
qrush / Inconsolata-dz-Powerline.otf
Created January 11, 2012 16:50
vim-powerline patched fonts
@kien
kien / gist:1610859
Created January 14, 2012 09:49
Custom statusline example
" File: after/plugin/ctrlp.vim
" Description: Custom statusline example
" Make sure ctrlp is installed and loaded
if !exists('g:loaded_ctrlp') || ( exists('g:loaded_ctrlp') && !g:loaded_ctrlp )
fini
en
" ctrlp only looks for this
@olivierlacan
olivierlacan / An_example.markdown
Created February 18, 2012 05:40 — forked from renz45/An_example.markdown
Re-style Sublime Text 2 sidebar to a darker theme

This re-styles your sublime text 2 sidebar to be darker, so it doesn't blind you when using a dark theme.

Dark sublime text 2 sidebar

Save the Default.sublime-theme file into packages/Theme - Default, make a backup of your original if you want to be able to go back easily.