Skip to content

Instantly share code, notes, and snippets.

<?php
function stickFile ($file, $x, $y)
{
global $dest;
$img = imagecreatefromjpeg($file["tmp_name"]);
$thumb = imagecreatetruecolor(150, 150);
list($width, $height) = getimagesize($file["tmp_name"]);
@felipap
felipap / gist:4215161
Created December 5, 2012 12:31
php renato
<?php
$HEIGHT = 600;
$WIDTH = 1000;
$xfactor = 2; 5;
$yfactor = 1; 0.001; 0.5;
$CENTER_X = $WIDTH/2;
$CENTER_Y = 400;
@felipap
felipap / game.c
Created September 14, 2012 23:31
joguinho do Brito
#include <stdio.h>
#include <stdlib.h>
struct _element {
struct _element *prev, *next;
int value;
};
struct _column {
struct _column *prev, *next;
#include <stdio.h>
#define CIDADES 20
int explorado[CIDADES],
localizacoes[CIDADES][CIDADES] =
{
{0, 71, -1, -1, -1, -1, -1, -1, -1, 151, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
{71, 0, 75, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
{-1, 75, 0, 118, -1, -1, -1, -1, -1, 140, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},