Skip to content

Instantly share code, notes, and snippets.

View fjcero's full-sized avatar

Francisco Caballero fjcero

View GitHub Profile
#!/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