Skip to content

Instantly share code, notes, and snippets.

View fititnt's full-sized avatar
💭
"The difficult we do immediately; the impossible takes a little longer"

Emerson Rocha fititnt

💭
"The difficult we do immediately; the impossible takes a little longer"
View GitHub Profile
@fititnt
fititnt / build.xml
Created August 15, 2011 04:47
Joomla 1.6+ XML of Install Packages
<?xml version="1.0" encoding="UTF-8"?>
<project name="package_test_build" default="build">
<target name="clean">
<echo msg="Cleaning directories" />
<delete dir="packages" includeemptydirs="true" />
<delete file="pkg_everything.zip" />
</target>
<target name="build">
<echo msg="Building package" />
@fititnt
fititnt / CLI-and-browser-argv
Created September 11, 2011 21:08
Emulate PHP-CLI argv arguments on Browser
<?php
/* Snippet code to emulate argv on browser like on CLI
* Author: Emerson Rocha Luiz (http://fititnt.org) License: WTFPLv2
*/
if ( !isset($_SERVER['HTTP_USER_AGENT']) ) {
$arguments = $argv;
} else {
$arguments = array();
@fititnt
fititnt / userplugin.php
Created December 16, 2011 04:06
Exemplo de como obter variaveis depois do cadastro de um usuario
<?php
// Plugin do tipo user
// No direct access
defined('_JEXEC') or die('Restricted access');
jimport('joomla.plugin.plugin');
class plgUserNomedoplugin extends JPlugin {
@fititnt
fititnt / helloworld.php
Created January 20, 2012 21:12
Visão salvando em mais de uma tabela
<?php
// admin / controllers / helloworld.php
jimport('joomla.application.component.controllerform');
class HelloWorldControllerHelloWorld extends JControllerForm
{
//...
public function save($key = null, $urlVar = null) {
@fititnt
fititnt / grid.css
Created July 20, 2012 12:48
Rascunho de grid base
.contem {
margin: 0 auto;
width: 60em; /* (960px/16) = 60em */
/* width: 960px; */
}
.contem:after {
content: "";
display: table;
clear: both;
}
@fititnt
fititnt / Makefile
Created February 2, 2013 16:55
example that listen to chances and compile LESS to CSS and JS. Make your changes. See https://github.com/twitter/bootstrap#developers $ make alligowatch
#
# Alligo
#
alligowatch:
echo "Alligo: Watching less files..."; \
watchr -e "watch('less/.*\.less') { system 'make alligo' }"
alligo:
@fititnt
fititnt / _readme.md
Last active July 24, 2019 18:16
PoC "Improve Joomla Semantics"

Readme

These files are only a suggestion, and are subject to change without notice.

Examples of usage

JHtml::_('microdata.scope');

Return actual scope. Must be inside of one element, like body or div tag.

Fallback to '' if does not have scope.

Correcao do trabalho pratico Ramses - 2014/02
Calculo do lucro total
Teste numero 1
Caso de teste 1 visitas=[4,2,4,0,4] lucro=[5,7,9,-1,-2,-3]
End.224 recebe 4
End.225 recebe 2
End.226 recebe 4
End.227 recebe 0
End.228 recebe 4
End.229 recebe 15
;
;====================================================================
; - Fonte base para a escrita de programa para o 8086
; - Utiliza o modelo small
;====================================================================
;
; Declaração do modelo de segmentos
.model small
@fititnt
fititnt / comentario.rkt
Last active August 29, 2015 14:10
comentarios
#lang racket/base
;; Arquivo contendo visão geral sobre como documentar código em scheme (Racket)
;; Estruct
;;------------------------------------------------------------------------------
(define-struct elemento
(nome simbolo nro-atomico serie-atomica))
;; Um elemento elemento de Elemento é uma estrutura
;; (make-elemento um-nome um-simbolo um-nro-atomico um-serie-atomica) onde