Skip to content

Instantly share code, notes, and snippets.

@alvesjtiago
alvesjtiago / post-commit
Created November 14, 2011 23:25
Git post-commit log to Kickoff
#!/bin/sh
#
# Hook script called after a successful commit is made.
#
# Commit is sent to Kickoff chat room with format - Gitbot: "Commit message" - Your name
#
# DON'T FORGET:
# - Change *ID* with your project ID
# - Change *TOKEN* with your project token
@alvesjtiago
alvesjtiago / gist:3352479
Created August 14, 2012 20:16
Fix for Beta Prime tumblr theme animation queue
$("h2").click(function(){ $("#desc").stop(true, true).slideToggle() })
@alvesjtiago
alvesjtiago / Prawn warning fix
Created September 3, 2012 10:26
Prevent Prawn "warning: already initialized constant PDF"
if Mime::Type.lookup_by_extension(:pdf) != 'application/pdf'
Mime::Type.register('application/pdf', :pdf)
end
@alvesjtiago
alvesjtiago / Google scripts
Last active October 11, 2015 16:47
How to install Google Scripts
How to install Google Scripts
1 - Go to https://drive.google.com
2 - Create a new spreadsheet
3 - Select "Tools" on the menu bar
4 - Then "Script Gallery"
5 - Search for your script (ex: "year old")
6 - Click install
7 - Follow instructions
@alvesjtiago
alvesjtiago / List of iOS calendar components
Created September 5, 2013 21:40
List of iOS calendar components
- Vurig Calendar: https://github.com/TjeerdVurig/Vurig-Calendar
- Tapku: https://github.com/devinross/tapkulibrary
- Kal: https://github.com/klazuka/Kal
- iOS-Calendar: https://github.com/vgrichina/ios-calendar
- ABCalendarPicker: https://github.com/k06a/ABCalendarPicker
- CKCalendar: https://github.com/jaykz52/CKCalendar
@alvesjtiago
alvesjtiago / NSInvocation+SimpleCreation.h
Created December 25, 2013 12:54
Create invocations the simple way. Extracted from ITActionManager.
//
// NSInvocation+SimpleCreation.h
// MAPI
//
// Created by Tiago Alves on 08/12/13.
// Copyright (c) 2013 Iterar. All rights reserved.
//
#import <Foundation/Foundation.h>
#!/usr/bin/env Rscript
print(1)
@alvesjtiago
alvesjtiago / 0_reuse_code.js
Last active August 29, 2015 14:15
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
@alvesjtiago
alvesjtiago / gist:e2c61eb288c9d488a8cc
Last active August 29, 2015 14:18
Remove alpha channel and transparencies from images for AppStore screenshots.
# Run the following code on a folder that contains all your images
for f in *.png; do convert "$f" -background white -alpha remove -flatten -alpha off "$f"; done
@alvesjtiago
alvesjtiago / opinionated_basic_rails_setup.md
Last active December 10, 2016 22:59
Opinionated Basic Rails Setup

Opinionated Basic Rails Setup

This is a basic Rails project setup on a Mac that helps me get up to speed when building a new app.
It is by no means a guide, reference or best practice.

Up and Run

  1. rails new project_name -d postgresql
  2. cd project_name
  3. cp config/database.yml config/example.database.yml