Skip to content

Instantly share code, notes, and snippets.

View xtranophilist's full-sized avatar

Dipesh Acharya xtranophilist

View GitHub Profile
#!/bin/sh
if [ ! -f sublime_text_3.tar.bz2 ]; then
curl -L "http://c758482.r82.cf2.rackcdn.com/sublime_text_3_build_3083_x32.tar.bz2" -o "sublime_text_3.tar.bz2"
fi
tar -xvjf sublime_text_3.tar.bz2
sudo cp -fr "sublime_text_3/sublime_text.desktop" "/usr/share/applications/sublime_text.desktop"
sudo sed -i 's/Icon=sublime-text/Icon=\/opt\/sublime_text\/Icon\/128x128\/sublime-text.png/g' /usr/share/applications/sublime_text.desktop
rm -rf /opt/sublime_text
@xtranophilist
xtranophilist / pre-commit.py
Last active August 29, 2015 14:06 — forked from ptone/gist:4102528
Git pre-commit hook for Python
#!/usr/bin/env python
import glob
import os
import sys
# git usurbs your bin path for hooks and will always run system python
site_packages = glob.glob('%s/lib/*/site-packages' % os.environ['VIRTUAL_ENV'])[0]
sys.path.insert(0, site_packages)
@xtranophilist
xtranophilist / natgeo_pic_of_the_day.sh
Last active November 5, 2015 04:03 — forked from fabianmaass/National Geographic Picture-Of-The-Day Wallpaper Script
National Geographic Picture-Of-The-Day Wallpaper Script
#!/bin/bash
# Copyright (c) 2011 Josh Schreuder
# http://www.postteenageliving.com
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions: