Skip to content

Instantly share code, notes, and snippets.

@dsamardzija
dsamardzija / reveal_in_side_bar.py
Created January 1, 2016 19:51 — forked from jbutko/reveal_in_side_bar.py
#SublimeText #Sublime: Show file in sidebar automatically
# Plugin to show active file in left sidebar
# Create a new Plugin: Menu Tools->New pluguin and save this:
import sublime, sublime_plugin
class SideBarListener(sublime_plugin.EventListener):
def on_activated(self, view):
view.window().run_command('reveal_in_side_bar')
@dsamardzija
dsamardzija / es.sh
Last active August 29, 2015 14:03 — forked from rajraj/es.sh
Install ElasticSearch + Marvel trial on CentOS 6
cd ~
sudo yum -y update
sudo yum -y install java-1.7.0-openjdk.i686
cd /tmp
wget https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-1.2.1.tar.gz -O elasticsearch.tar.gz
tar -xf elasticsearch.tar.gz
rm elasticsearch.tar.gz
mv elasticsearch-* elasticsearch
# Adapted from https://gist.github.com/henriquemoody/3288681
#!/bin/sh
SHORTCUT="[Desktop Entry]
Name=Sublime Text 2
Comment=Edit text files
Exec=/usr/local/sublime-text-2/sublime_text
Icon=/usr/local/sublime-text-2/Icon/128x128/sublime_text.png
Terminal=false
Type=Application
@dsamardzija
dsamardzija / gist:5840456
Last active December 18, 2015 20:29
Shell prompt with git branch and dirty state
source ~/.git-completion.sh
COLOR_1="\[\e[0;32m\]" # green
COLOR_2="\[\e[1;34m\]" # blue
COLOR_3="\[\e[1;37m\]" # white
USER_AT_HOST="\u@\h"
TIME_WITH_BRACKETS="[\t]"
SPACE=" "
DIR="\w"
DIR_BASENAME="\W"
data:text/html, <style type="text/css">#e{position:absolute;top:0;right:0;bottom:0;left:0;}</style><div id="e"></div><script src="http://d1n0x3qji82z53.cloudfront.net/src-min-noconflict/ace.js" type="text/javascript" charset="utf-8"></script><script>var e=ace.edit("e");e.setTheme("ace/theme/monokai");e.getSession().setMode("ace/mode/ruby");</script>