Skip to content

Instantly share code, notes, and snippets.

View xiam's full-sized avatar

José Nieto xiam

View GitHub Profile
<?PHP
/****
* MiTagPHP v 1.0
* Copyright (C) 2003 Cid (pxm@atomika.tk)
* Sitio oficial: http://www.atomika.tk
****/
include("vars.php");
$auth = MD5("$con$usu");
if ($auth == MD5("$passw$admin")) {
echo "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.1 Transitional//EN\">\n<HTML>\n<HEAD>\n<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; CHARSET=iso-8859-1\">\n<META NAME=\"Description\" CONTENT=\"MiTagPHP - TagBoard gratuito, consigue el tuyo en http://www.atomika.tk\">\n<META NAME=\"Author\" CONTENT=\"Cid (pxm@atomika.tk)\">\n<META NAME=\"Generator\" CONTENT=\"MyTagPHP v$msg[1]\">\n";
package main
import (
"fmt"
"log"
"math/rand"
"time"
"github.com/influxdata/influxdb/client/v2"
)
@xiam
xiam / gist:56d8fe575176f459613d
Last active August 29, 2015 14:22
Patch for the gomobile Dockerfile that applies a patch to Go...
From 23d337d1921f5d7cadea6763a657f830b2453068 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jos=C3=A9=20Carlos=20Nieto?= <jose.carlos@menteslibres.net>
Date: Wed, 27 May 2015 17:49:14 -0500
Subject: [PATCH] Patch for the gomobile Dockerfile that applies a patch to
Go...
---
Dockerfile | 1 +
1 file changed, 1 insertion(+)
--- /go/src/net/file_test.go 2015-05-26 17:20:34.000000000 -0400
+++ /go/src/net/file_test.go.fixed 2015-05-27 16:03:17.486632591 -0400
@@ -189,7 +189,10 @@
if skipServerTest(tt.net, "unixgram", tt.addr, tt.ipv6, false, tt.linux) {
continue
}
- if os.Getuid() != 0 && tt.net == "ip4:icmp" {
+ // It seems like creating ICMP packets is not supported in the
+ // newest docker, let's just skip it so we can continue
+ // working.
package main
import (
"log"
"menteslibres.net/gosexy/resource"
"menteslibres.net/gosexy/rest"
"menteslibres.net/gosexy/to"
"net/url"
"sync"
"time"
@xiam
xiam / reddit_example.go
Created January 6, 2014 13:36
An example file for using reddit API with Go.
package main
import (
"fmt"
"menteslibres.net/gosexy/rest"
"menteslibres.net/gosexy/to"
"net/url"
"time"
)
@xiam
xiam / main.c
Created September 10, 2013 11:45
Un experimento para emular acceso a contexto desde métodos en C.
/*
* Éste experimento partió de una discusión iniciada por @toorandom y
* continuada por @nitr0usmx y @dexosexo:
*
* https://twitter.com/toorandom/status/377256908538671104
*
* El problema es obtener la dirección de una estructura a partir de uno de
* los apuntadores a funciones dentro de la misma. Como hacer un "this" o
* "self" dentro de un método en lenguajes oriendados a objetos.
*
@xiam
xiam / gist:6504646
Last active December 22, 2015 17:09
Buscando algo con @toorandom y @nitr0usmx.
#include <stdlib.h>
#include <stdio.h>
typedef struct temp {
int a;
int (*b)(struct temp*, int); // queremos quitar el struct temp* de aquí.
} temp_t;
// ...Y envolver B.
int B(temp_t *self, int x) {
@xiam
xiam / Castle.xml
Created November 29, 2012 00:59 — forked from bemasher/Castle.xml
Example of parsing xml in golang.
<?xml version="1.0" encoding="UTF-8" ?>
<Data>
<Series>
<id>83462</id>
<Actors>|Nathan Fillion|Stana Katic|Molly C. Quinn|Jon Huertas|Seamus Dever|Tamala Jones|Susan Sullivan|Ruben Santiago-Hudson|Monet Mazur|</Actors>
<Airs_DayOfWeek>Monday</Airs_DayOfWeek>
<Airs_Time>10:00 PM</Airs_Time>
<ContentRating>TV-PG</ContentRating>
<FirstAired>2009-03-09</FirstAired>
<Genre>|Drama|</Genre>