Skip to content

Instantly share code, notes, and snippets.

View fjcero's full-sized avatar

Francisco Caballero fjcero

View GitHub Profile
@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
<!-- 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:4443876
Last active December 10, 2015 13:58
# asd

Mac Setup

Dev Tools

  • Xcode
  • Homebrew
  • Sequel Pro
  • iTerm2
  • Git
  • Virtualbox
#!/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 / 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:

What's this PR do?

Where should the reviewer start?

How should this be manually tested?

Any background context you want to provide?

What are the relevant tickets?

Screenshots (if appropriate)

Questions:

  • Is there a blog post?
  • Does the knowledge base need an update?
  • Does this add new (Python) dependencies which need to be added to chef?

Command Name

Description of the command.

Usage

Choose your flavor:

$ php bin/Hermes.php --execute CommandName [--option1="..."] [--option2="..."] [--optionN]
@fjcero
fjcero / README.md
Last active August 29, 2015 14:13
PHP Debugging

PHP Debugging

Install

Vagrant

The configuration is already deployed in the local branch in Olapic/Puppet. Just do:

$ cd Environment64; vagrant provision;
@fjcero
fjcero / 0_reuse_code.js
Last active August 29, 2015 14:14
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application: