Public Gists by rduarte

Gravatar
Thu Nov 12 15:22:22 -0800 2009
1
2
3
run 'gem sources -a http://gemcutter.org'
 
git :init
Gravatar
Wed Nov 11 18:19:00 -0800 2009
1
PS1="\\w:\$(git branch 2>/dev/null | grep '^*' | colrm 1 2)\$ "
gist: 205549 RPCFN: Average Arrival Time...
Gravatar
Thu Oct 08 17:00:16 -0700 2009
1
2
3
require 'time'
def average_time_of_day(times)
    clean = Array.new
Gravatar
Sun Sep 20 18:15:54 -0700 2009
1
2
3
class ApplicationController < ActionController::Base
  before_filter :set_application
  
Gravatar
Sun Sep 20 16:45:31 -0700 2009
1
2
3
# Removendo porcarias
run "rm README"
run "rm public/index.html"
Gravatar
Wed Sep 16 04:27:36 -0700 2009
1
2
3
// http://www.learningjquery.com/2008/08/quick-tip-dynamically-add-an-icon-for-external-links
$(document).ready(function() {
  $('#extlinks a').filter(function() {
Gravatar
Mon Sep 14 05:45:58 -0700 2009
1
2
3
set :application, "myapp"
set :keep_releases, 5
 
Gravatar
Fri Jul 17 16:00:16 -0700 2009
1
2
3
$ cd ~
$ mkdir .ssh
$ chmod 700 .ssh/
Gravatar
Thu Jun 04 05:33:50 -0700 2009
1
2
3
<?php
$useCache = true;
if ($useCache){
Gravatar
Fri May 15 04:27:02 -0700 2009
1
2
3
<?php
ini_set('default_charset', 'utf-8');
header('Content-type: application/xml');
Gravatar
Tue May 12 19:00:14 -0700 2009
1
2
3
class Array
  def shuffle!
    size.downto(1) { |n| push delete_at(rand(n)) }
Gravatar
Thu Apr 09 15:32:51 -0700 2009
1
2
3
<FilesMatch "\.(html|htm|js|css|gif|jpg|png)$">
        FileETag None
        <IfModule mod_headers.c>
gist: 91380 Check MD5 integrity and imp...
Gravatar
Tue Apr 07 11:38:30 -0700 2009
1
2
3
#!/bin/bash
db_host="localhost"
db_name="database"
gist: 89542 algorithm based on base64 f...
Gravatar
Thu Apr 02 15:40:07 -0700 2009
1
2
3
<?php
function codificar($valor, $chave){
 
gist: 89540 base62 algorithm - encode a...
Gravatar
Thu Apr 02 15:34:20 -0700 2009
1
2
3
<?php
function base62_encode($num){
    $chars = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
Gravatar
Sun Feb 08 11:16:30 -0800 2009
1
2
3
sudo apt-get install php5 php-pear mysql-server php5-gd
sudo a2enmod rewrite
sudo /etc/init.d/apache2 restart
Gravatar
Wed Jan 14 13:48:29 -0800 2009
1
2
3
$ sudo apt-get update
$ sudo apt-get install linux-backports-modules-intrepid linux-backports-modules-intrepid-generic
$ sudo apt-get remove gnome-orca cdrdao evolution brasero compiz compiz-core libcompizconfig0 compizconfig-backend-gconf compiz-wrapper f-spot transmission-common gnome-pilot libgnome-pilot2 language-pack-en language-pack-gnome-en aspell-en gimp-help-en hunspell-en-us myspell-en-au myspell-en-za myspell-en-gb tracker xsane-common ekiga
Gravatar
Fri Jan 09 10:21:57 -0800 2009
1
2
3
Considere a seguinte estrutura de arquivos:
./Carros/
./Carros/1.0/ka.txt
Gravatar
Wed Jan 07 08:12:06 -0800 2009
1
2
3
<?php
$manager_strings['Bem_Vindo'] = 'Bem vindo ao meu site, %s';
$manager_strings['Noticias_introducao'] = 'Quanto é %s + %s + %s?';