This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
# Marco Gomes | |
# http://marcogomes.com | |
# adbird / pass padrao para servicos | |
# 2008-10-16 | |
# São Paulo, Brazil | |
# recebe via POST: | |
# username |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Em JS seria assim | |
a=2; | |
b=8; | |
c = ( a + b ) * a; | |
alert( 'Resultado (' + a + ' + ' + b + ') x ' + a + ' = ' + c ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Ler número A | |
Ler número B | |
Calcule A + B = C | |
Calcule C * A = D | |
Mostre D |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Alternativa para baixar FLV do YouTube | |
# Por Alexandre Brito | |
Vi que o Youtube não estava impedindo os downloads toscos que a gente vê naqueles tutoriais com o get_video. | |
Então dei uma pesquisada e encontrei inúmeras salas de discussão com gente com os mesmos achismos. A partir de suas observações e posts adaptei um arquivo em PHP: | |
<?php | |
$url = trim(($_POST['url']) ? $_POST['url'] : $_GET['url']); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## aparentemente datetime() nao compara horas | |
# doc: <http://docs.python.org/library/datetime.html#datetime.datetime> | |
# datetime(AAAA, MM, DD, H) | |
from datetime import datetime | |
self.start = datetime(2009, 5, 15, 20) | |
self.end = datetime(2009, 8, 1) | |
# if abaixo vai retornar True mesmo que estejamos no dia 15 as 4h | |
# basta estar no dia 15, a qualquer hora, retorna True | |
if self.start < datetime.now() < self.end: | |
print "True: estamos dentro do periodo de tempo" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Marco Gomes, São Paulo, 2009-04 | |
Usar Photoshop pra fazer convite eh coisa de n00b! | |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION | |
0. You just DO WHAT THE FUCK YOU WANT TO. | |
WTFPL: http://sam.zoy.org/wtfpl/ | |
*/ | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jsonBooboxApi({ | |
"bid": "114", | |
"keywords": "livro+javascript", | |
"content_type": "widget", | |
"el": null, | |
"item": [{ | |
"id": "193d32e739d86fce1c773b87b15fbebd4812eae6", | |
"_value": { | |
"shop": "submarinoid", | |
"price": "R$ 117,77", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Marco Gomes, São Paulo, 2009-03 | |
Usar Photoshop pra fazer convite eh coisa de n00b! | |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION | |
0. You just DO WHAT THE FUCK YOU WANT TO. | |
WTFPL: http://sam.zoy.org/wtfpl/ | |
*/ | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## no lugar do código da imagem, coloque | |
<a class="bbli" href="http://boo-box.com/link/bid:6031/langt-BR/tags:futebol+esporte/formatar" target="_blank"> | |
<img src="{//noticia/@foto}" border="0" title="{//noticia/@titulo}" alt="{//noticia/@titulo}" /> | |
</a> | |
<script type="text/javascript" src="http://stable.boo-box.com/"></script> | |
<style> | |
#boo-bar #boo-bar-ins h2{background:url("/img/ei_bar_logo.png") no-repeat !important; filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='/img/ei_bar_logo.png',sizingMethod='image');} | |