Skip to content

Instantly share code, notes, and snippets.

View danirod's full-sized avatar
🎯
I may be slow to respond.

Dani Rodríguez danirod

🎯
I may be slow to respond.
View GitHub Profile
@danirod
danirod / suma.c
Created March 31, 2014 21:34
snippet sencillo para una entrada de blog
int sumar(int a, int b) {
return a + b;
}
@danirod
danirod / appnameapplet.cpp
Last active August 29, 2015 13:58
Modificación hecha a appnameapplet.cpp
/*
* This is a modification done to unity-2d v5.14.0
* This source code is based on unity-2d.
* File: panel/applets/appname/appnameapplet.cpp
*
* Copyright 2010 Canonical Ltd.
*
* Authors:
* - Aurélien Gâteau <aurelien.gateau@canonical.com>
*
@danirod
danirod / stresstest.c
Created March 6, 2015 20:08
SDL Stresstest
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <SDL2/SDL.h>
static SDL_Surface*
init_sdl_surface()
{
Uint32 rmask, gmask, bmask, amask;
#if SDL_BYTEORDER == SDL_BIG_ENDIAN
@danirod
danirod / Sistema de bloqueo de componentes de terceros.php
Created September 7, 2012 17:30
Código fuente del sistema de bloqueo de componentes de terceros usado en mi web
<?php
/*
* Sistema de bloqueo de componentes de terceros
* Copyright (C) 2012 Dani Rodríguez <danirod@outlook.com>
*
* Este código fuente proporciona de manera pública TAL CUAL, sin garantías de
* ningún tipo. Este código fuente queda en dominio público. Se permite el
* acceso, uso y reutilización de este código fuente en otros sistemas sin
* necesidad de permiso previo ni de notificación de uso.
@danirod
danirod / Sample HTML Code.html
Created September 11, 2012 18:10
Some sample HTML code I found on the Internet. I don't know which page did I took this from, but as I often need this snippet, maybe it's a good idea to save it somewhere.
<!-- Sample Content to Plugin to Template -->
<p>The purpose of this HTML is to help determine what default settings are with CSS and to make sure that all possible HTML Elements are included in this HTML so as to not miss any possible Elements when designing a site.</p>
<hr />
<h1 id="headings">Headings</h1>
<h1>Heading 1</h1>
<h2>Heading 2</h2>
<h3>Heading 3</h3>
@danirod
danirod / slick2d_sesion02.java
Created November 10, 2012 19:40
Código fuente visto en el episodio correspondiente de Slick2D
/*
* Este código fuente acompaña al episodio
* Desarrollando un juego en Slick2D - 2. Instalando y programando.
* La dirección del vídeo es http://www.youtube.com/watch?v=qSx4hp47dag.
* Para material adicional, visita http://tutos.danirod.tk/qSx4hp47dag.
*
* © 2012 Dani Rodríguez <danirod@outlook.com>
* Se permite el uso y la distribución de este código fuente de forma
* total o parcial siempre que se mantenga y se indique la autoría
* original del código fuente y que se incluya este mensaje de
package danirod.snippet.test.slick2d.rrtest;
import org.newdawn.slick.AppGameContainer;
import org.newdawn.slick.BasicGame;
import org.newdawn.slick.GameContainer;
import org.newdawn.slick.Graphics;
import org.newdawn.slick.SlickException;
import org.newdawn.slick.geom.Rectangle;
import org.newdawn.slick.geom.RoundedRectangle;
import org.newdawn.slick.geom.Shape;
@danirod
danirod / gdbk_helloworld.c
Created August 17, 2013 16:50
Jugando un poco con el GBDK. No me hago responsable de lo que puedas hacer con esto. Necesitas tener instalado el GDBK (Game Boy Developer Kit) - http://gdbk.sourceforge.net
// Jugando un poco con el GBDK.
// Autor: Dani Rodríguez [t:@danirod93]
// No me hago responsable de lo que puedas hacer con esto.
// Necesitas tener instalado el GDBK (Game Boy Developer Kit)
// http://gdbk.sourceforge.net
#include <gb/gb.h>
#include <rand.h>
#include <stdio.h>
@danirod
danirod / hello_sdl.cpp
Created September 7, 2013 17:28
Código fuente de muestra usado en el episodio 02 de la serie Desarrollo de juegos con SDL2.
#include <SDL2/SDL.h>
int main(int argc, char** argv)
{
SDL_Init(SDL_INIT_EVERYTHING);
SDL_Quit();
return 0;
}
@danirod
danirod / struct_static.c
Created September 21, 2013 21:54
ejemplo structs memoria estática
#include <stdio.h>
#include <stdlib.h>
/* Estructura de un producto */
typedef struct {
int codigo_producto; /* código del producto */
char descripcion[20]; /* descripción del producto */
float precio_unitario; /* precio del producto sin IVA */
} t_producto;