Skip to content

Instantly share code, notes, and snippets.

View ph's full-sized avatar
💭
Where is the Microsoft Paperclip?

Pier-Hugues Pellerin ph

💭
Where is the Microsoft Paperclip?
View GitHub Profile
We couldn’t find that file to show.
=== Epic Snow Leopard Upgrayyyyd Guide ===
Son, you’re now living in the land of 64-bit systems.
That means that some of your 32-bit shit is now broken.
Not all is lost.
== Fixing MySQL weirdness
public createSomething() {
CustomPriorityQueue cp = new CustomPriorityQueue();
// do something complex and fetch data somewhere..
ArrayList rawDatas = SystemComplex.fetch();
for(Result r : rawDatas) {
cp.insert(new MaclasseSpecifierOnRuntime(r)
}
@ph
ph / carbon.md
Created November 5, 2009 21:15 — forked from defunkt/carbon.md

Vim

autocmd BufWritePre * :%s/\s\+$//e

Emacs

(add-hook 'before-save-hook 'delete-trailing-whitespace)

Textmate

+---+ +---+
| | | |
| | | |
| | | |
| +---+ +-------+
| |
| RabbitMQ +---+ |
| | | |
| v2.4.1 +---+ |
| |
@ph
ph / gist:981286
Created May 19, 2011 17:31
Twitter-user/show
{
"name": "Twitter API",
"profile_sidebar_border_color": "87bc44",
"profile_background_tile": false,
"profile_sidebar_fill_color": "e0ff92",
"location": "San Francisco, CA",
"profile_image_url": "http://a3.twimg.com/profile_images/689684365/api_normal.png",
"created_at": "Wed May 23 06:01:13 +0000 2007",
"profile_link_color": "0000ff",
"favourites_count": 2,
@ph
ph / gist:981314
Created May 19, 2011 17:44
Twitter-search timeline
{
"from_user_id_str": "205782815",
"profile_image_url": "http://a3.twimg.com/profile_images/1187295220/Snapshot_20101210_7_normal.jpg",
"created_at": "Thu, 19 May 2011 16:41:02 +0000",
"from_user": "MsSonais",
"id_str": "71254043548327936",
"metadata": {
"result_type": "recent"
},
"to_user_id": null,
@ph
ph / Streaming.json
Created May 19, 2011 17:45
Twitter-search timeline
{
"in_reply_to_status_id_str": null,
"text": "Quando voc\u00ea mais precisa que as pessoas d\u00eaem apoio e for\u00e7a, elas duvidam..",
"contributors": null,
"retweeted": false,
"in_reply_to_user_id_str": null,
"geo": null,
"source": "web",
"coordinates": null,
"in_reply_to_user_id": null,
@ph
ph / gist:1393967
Created November 25, 2011 16:56
wp_query
<?php
$query = new WP_Query();
$posts = $query->query(array(
'post_type' => 'post',
'post_status' => 'publish',
'orderby' => 'date',
'order' => 'DESC',
'meta_query' => array(
'key' => '_test',
@ph
ph / load.vim
Created December 12, 2011 02:46
set nocompatible
set encoding=utf-8
set scrolloff=3
set backspace=2
set number
set cursorline
set lines=60
set autoindent
set smarttab
set expandtab