Skip to content

Instantly share code, notes, and snippets.

@juniorz
juniorz / x
Created October 25, 2008 02:18
CmdUtils.makeBookmarkletCommand({
name: "Google Reader",
homepage: "http://reinaldojunior.net/",
author: { name: "Reinaldo de Souza Jr", email: "[email protected]"},
license: "GPL",
icon: "http://www.google.com.br/reader/ui/favicon.ico",
preview: "Inscreve o feed RSS dessa página no Google Reader",
/*
//Poderia utilizar isso para encontrar os FEEDs da pagina atual
preview: function( pblock ) {
<?php
//Inicia a sessão
session_start();
//Inicia a variável
if(! array_key_exists('sesTestando', $_SESSION) ){
$_SESSION['sesTestando'] = 0;
}
@juniorz
juniorz / .bashrc
Created July 22, 2009 02:36 — forked from mss/.bashrc
if [ "\$(type -t __git_ps1)" ]; then
PS1="\$(__git_ps1 '(%s) ')$PS1"
fi
<?php
/*
incluo a classe que eu vou usar, confiando que no "ambiente" $dir_raiz vai me dar o diretorio raiz em relação a aplicação rodando.
*/
include($dir_raiz.'/classes/pai.php');
class Filha extends Pai
{
public $var1 = 'SimSimSim';
## This solves "Font not found Helvetica" problems with running GnuStep apps
## Make the fonts and leave them in the Fonts directory
cd /usr/share/GNUstep/Fonts
mknfonts /usr/share/fonts/truetype/freefont/*
@juniorz
juniorz / documentation.patch
Created April 5, 2011 02:15
my first GSoC task
diff --git a/html/toc.html b/html/toc.html
index 326f0a9..663970f 100644
--- a/html/toc.html
+++ b/html/toc.html
@@ -8,6 +8,7 @@
<body>
<h1>Table of Contents</h1>
-Please enter your text here.
+Please enter your text here,
@juniorz
juniorz / D.h
Created April 21, 2011 12:37
Como evitar multiplas inclusões de um cabeçalho (C/C++)
/*
Ao usar o ifndef (if not defined) o pre-processador só vai inserir o texto dentro do ifndef
se a constante __D_HEADER__ (deve ser uma constante unica, por isso os __ antes e depois) não estiver definida =D
*/
#ifndef __D_HEADER__
#define __D_HEADER__
/* Assinatura das funções de D.h */
#endif
@juniorz
juniorz / HelloWorld.droid
Created May 30, 2011 00:41
Hello World using the Droid DSL
/*
* HelloWorld Example
* Based on: http://developer.android.com/resources/tutorials/hello-world.html
*/
application "Hello, Android!" => com.example.android.hellodroid {
string hello = "Hello, Android! I am a string resource!"
screen HelloDroid {
# textView: @string hello
@juniorz
juniorz / LinearLayout.droid
Created May 30, 2011 01:51
Hello Views (Linear Layout) using Droid DSL
/*
* HelloViews (Linear Layout)
* Based on: http://developer.android.com/resources/tutorials/views/hello-linearlayout.html
*/
application "Hello, Android!" => com.example.android.hellodroid {
screen HelloDroid {
# linear layout {
orientation: vertical;
@juniorz
juniorz / RelativeLayout.droid
Created May 30, 2011 01:52
Hello Views (Relative Layout) using Droid DSL
/*
* Relative Layout Example
* Based on: http://developer.android.com/resources/tutorials/views/hello-relativelayout.html
*/
application "Hello, Android!" com.example.android.hellodroid {
activity HelloDroid {
=> show main
}