Skip to content

Instantly share code, notes, and snippets.

View fjcero's full-sized avatar

Francisco Caballero fjcero

View GitHub Profile
@fjcero
fjcero / pr.md
Created March 25, 2013 14:30 — forked from piscisaureus/pr.md

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = [email protected]:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

#!/bin/bash
# Script for placing sudoers.d files with syntax-checking
# Making a temporary file to contain the sudoers-changes to be pre-checked
TMP=$(mktemp -t vagrant_sudoers)
cat /etc/sudoers > $TMP
cat >> $TMP <<EOF
# Allow passwordless startup of Vagrant when using NFS.
Cmnd_Alias VAGRANT_EXPORTS_ADD = /usr/bin/su root -c echo '*' >> /etc/exports
@fjcero
fjcero / gist:4443876
Last active December 10, 2015 13:58
# asd

Mac Setup

Dev Tools

  • Xcode
  • Homebrew
  • Sequel Pro
  • iTerm2
  • Git
  • Virtualbox
<!-- Text Box -->
<div class="form-item form-text">
<label for="text">Label</label>
<input type="text" name="text" id="text"/>
<span class="css-tooltip css-tooltip-top">Lorem ipsum dolor sit amet</span>
</div>
<!-- Check Box -->
<div class="form-item form-check">
<label for="check" class="label">Label</label>
@fjcero
fjcero / gist:2223967
Created March 28, 2012 05:44
Conversion de Twitter Status ID
Python
======
>>> status_id = int(184846323277770752)
>>> timestamp = (status_id >> 22)
>>> print timestamp
44070797748
>>> timestamp = (status_id >> 22) + 1288834974657
>>> print timestamp
1332905772405