Skip to content

Instantly share code, notes, and snippets.

View jsanchezpando's full-sized avatar

Outdated (https://github.com/j-san) jsanchezpando

View GitHub Profile
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active May 3, 2024 19:09
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@jbgo
jbgo / commit-msg
Created February 23, 2012 19:16
Git hook to require a PT story# in your commit message
#!/usr/bin/env ruby
unless File.new(ARGV.first).read =~ /\[#\d+/
puts "Commit aborted! Missing reference to Pivotal Tracker story in commit message. (e.g. [#12345])"
exit 1
end
@bradleyayers
bradleyayers / gist:1660182
Created January 23, 2012 02:59
Save to `/etc/dbus-1/system.d/Upstart.conf` to enable Upstart user jobs
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE busconfig PUBLIC
"-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
<busconfig>
<!-- Only the root user can own the Upstart name -->
<policy user="root">
<allow own="com.ubuntu.Upstart" />
</policy>
@jsanchezpando
jsanchezpando / LoggedTestCase.py
Created January 5, 2012 11:05
base for test logged django site pages
from django.contrib.auth.models import User
class LoggedTestCase(TestCase):
def setUp(self):
self.user = User.objects.create_user('admin', 'test@example.com', 'pwd')
self.user.save()
self.client = Client()
self.client.login(username='admin', password='pwd')