Skip to content

Instantly share code, notes, and snippets.

View douglasmiranda's full-sized avatar
👽

Douglas Miranda douglasmiranda

👽
  • Earth, Brazil
View GitHub Profile
@douglasmiranda
douglasmiranda / mb_convert_case.php
Created June 28, 2011 16:06
[PHP strtolower, strtoupper, mb_convert_case] - Fix problems with accentuation / Corrigindo problemas de acentuação
<html>
<head>
<title>Using mb_convert_case</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<body>
<?php
// PHP still have problems with unicode, so Multi Byte functions solve part of this problem.
// For more information: http://www.php.net/manual/en/ref.mbstring.php
@douglasmiranda
douglasmiranda / mod_rewrite
Created June 28, 2011 14:26
Enable mod_rewrite apache (I always forget)
a2enmod rewrite
@douglasmiranda
douglasmiranda / last_tweet.js
Created June 23, 2011 18:28
Get the last tweet. (Requires the Jquery library)
$(document).ready(function(){
$.getJSON("http://twitter.com/statuses/user_timeline/YOUR_TWITTER_USERNAME.json?callback=?", function(data) {
$("#last-tweet").html(data[0].text);
});
});