Skip to content

Instantly share code, notes, and snippets.

View vestel's full-sized avatar

Aleksandrs Zdancuks vestel

View GitHub Profile
@peterwongpp
peterwongpp / gist:2994714
Created June 26, 2012 09:43
My Shell Command Line Format - colored, with Git support and shortened
# return the current git branch name
parse_git_branch() {
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\ →\ \1/'
}
# return the string of state of the branch
parse_git_dirty() {
D="$(git status 2> /dev/null | tail -n1 | awk '{ print $1 }' )"
if [ "$D" = "nothing" ] ; then
echo -e "(clean) "
@karpelcevs
karpelcevs / buy_iphone.rb
Created March 30, 2012 13:47
Superakcijas
#!/usr/bin/env ruby
require 'rubygems'
require 'hpricot'
require 'open-uri'
@url = "http://www.superakcijas.lv/public/"
@deals = "more_deals.php"
@response = ''
@search_string = 'iPhone'
@lxneng
lxneng / gist:1031014
Created June 17, 2011 07:30
Exception: `curl-config' not found -- please install the libcurl development files
(env)~/env pip install pycurl
Downloading/unpacking pycurl
Downloading pycurl-7.19.0.tar.gz (71Kb): 71Kb downloaded
Running setup.py egg_info for package pycurl
sh: curl-config: not found
Traceback (most recent call last):
File "<string>", line 14, in <module>
File "/home/eric/env/build/pycurl/setup.py", line 90, in <module>
raise Exception, ("`%s' not found -- please install the libcurl development files" % CURL_CONFIG)
Exception: `curl-config' not found -- please install the libcurl development files