Skip to content

Instantly share code, notes, and snippets.

View tibo's full-sized avatar

Thibaut LE LEVIER tibo

  • Nantes, France
View GitHub Profile
@toland
toland / tumblr-import.rb
Created March 15, 2010 03:03
Script to import Wordpress content into Tumblr
require 'rubygems'
require 'net/http'
require 'nokogiri'
TUMBLR_USER = 'your@email.com'
TUMBLR_PASS = 'yourpassword'
url = URI.parse('http://www.tumblr.com/api/write')
# Read the WP export file
Kerberos + Apache + SVN
=======================
I did this on Ubuntu server 10.10. Based on this: https://help.ubuntu.com/community/Kerberos
1) Make sure the server has appropriate DNS info, e.g.: (/etc/hosts)
10.0.1.147 draco.madebysofa.com
127.0.0.1 localhost ubuntu
@markrickert
markrickert / iOSPeelAwayExample.m
Created September 14, 2011 14:42
iOS Peel-Away Example
- (IBAction) pressedPeelIt:(UIButton *)sender
{
//Disable the button so they can't press it
self.peelIt.enabled = NO;
[self.textHere resignFirstResponder];
//Create a new UIView and set the background color to be a UIColor with pattern image of a screen capture
UIView *imgView = [[UIView alloc] init];
[self.view addSubview:imgView];
@BenHall
BenHall / bootstrap.jade
Created November 22, 2011 18:36
Twitter Bootstrap in Jade
script(src='/javascripts/jquery-1.7.min.js')
link(rel='stylesheet', href='/stylesheets/bootstrap.min.css')
link(rel='stylesheet', href='/stylesheets/bootstrap-overrides.css')
@vilcsak
vilcsak / iphone-screenshot
Created February 2, 2012 22:38
Automate capturing screenshots of the iPhone simulator
#!/bin/sh
# A) Run ./iphone-screenshot
# B) Type in the screenshot filename
# C) Click on the iPhone simulator
OUTPUTDIR=~/Desktop
TEMPFILE=iphone_screenshot_temp.png
echo "output filename:\c"
@aledalgrande
aledalgrande / gist:1845935
Created February 16, 2012 15:58
Capistrano configuration for RVM, bundler, Sinatra and Unicorn
require "bundler/capistrano"
$:.unshift(File.expand_path('./lib', ENV['rvm_path']))
require "rvm/capistrano"
set :rvm_ruby_string, '1.9.2@sinatroxy'
set :rvm_type, :system
set :bundle_flags, "--deployment"
set :application, "sinatroxy"
set :repository, "xxx@yyy:sinatroxy"
@nielsbot
nielsbot / UIImage+JPEG2000.h
Created February 19, 2012 00:43
Decoding JPEG 2000 files to UIImage
#import <Foundation/Foundation.h>
extern UIImage * UIImageWithJPEG2000Data( NSData * data ) ;
@erikh
erikh / hack.sh
Created March 31, 2012 07:02 — forked from DAddYE/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
@cearls
cearls / cap_multio.rb
Created June 19, 2012 20:56
Capistrano recipe: WebFaction, Padrino, Bundler, DataMapper
set :application, "multio"
set :scm, :git
set :repository, "git@bitbucket.org:cearls/multio.git"
set :domain, "web310.webfaction.com"
set :user, "cearls"
set :scm_username, "cearls"
set :use_sudo, false
default_run_options[:pty] = true
set :ssh_options, {:forward_agent => true}
@0xced
0xced / XCDFakeCarrier.m
Last active March 5, 2023 22:07
Hack to choose the displayed carrier name in the iOS simulator
//
// Copyright (c) 2012-2015 Cédric Luthi / @0xced. All rights reserved.
//
#import <Foundation/Foundation.h>
#if TARGET_OS_SIMULATOR
static const char *fakeCarrier;
static const char *fakeTime;