Skip to content

Instantly share code, notes, and snippets.

@StuMx
StuMx / gist:50452e035bfff3601202
Created August 22, 2014 18:37
Redirigir a index.php en IIS
<rule name="Redirigir a index.php" patternSyntax="Wildcard" stopProcessing="true">
<match url="*" ignoreCase="true" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
</conditions>
<action type="Rewrite" url="index.php" appendQueryString="true" />
</rule>
@StuMx
StuMx / 0_reuse_code.js
Created March 31, 2014 20:42
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@StuMx
StuMx / streamLoader.js
Created February 27, 2012 20:56
Twitter stream using javascript.
/*
* You have to include oauth.js and sha1.js from here http://oauth.googlecode.com/svn/code/javascript/
* /
var url = "https://userstream.twitter.com/2/user.json";
var accessor = {
token: "",
tokenSecret: "",
consumerKey : "",
consumerSecret: ""
@StuMx
StuMx / OAuthSimple.js
Created February 8, 2012 06:04
OAuthSimple
/* OAuthSimple
* A simpler version of OAuth
*
* author: jr conlin
* mail: [email protected]
* copyright: unitedHeroes.net
* version: 1.2
* url: http://unitedHeroes.net/OAuthSimple
*
* Copyright (c) 2011, unitedHeroes.net
@StuMx
StuMx / sOffTimer.sh
Created June 22, 2011 07:44
Apaga la pantlla y bloquea la maquina
##Necesita tener slock
echo " Apagando pantalla"
slock &
sleep 1 && xset dpms force off
proceso="pidof slock"
while $proceso
do
@StuMx
StuMx / obConfigure.sh
Created February 21, 2011 01:16
Para hacer un intento de configuracion automatica en openbox por que me da pereza hacerlo manual xD.
# Instalando Cosas
programas="openbox xcompmgr transset-df feh tint2 chromium firefox pidgin gimp libreoffice lxterminal thunar gnome-icon-theme viewnior leafpad openssh"
echo "Se van a instalar los programas"
echo $programas
su -c "pacman -S $programas"
#su -c "pacman -S xcompmgr transset-df feh tint2 chromium firefox pidgin gimp libreoffice lxterminal thunar"
@StuMx
StuMx / inapos.c
Created September 9, 2010 20:32
Convertir notación infija a posfija.
#include <stdlib.h>
typedef struct Nodo{
int info;
struct Nodo *sig;
} *Pila;
Pila empty(){
return NULL;
}
@StuMx
StuMx / CPMexico countdown
Created August 25, 2010 04:16
Un contador de tiempo para un evento en javascript
<script type="text/javascript">
var millisecs_per_day=86400000
var evnt_name=""//Used during the event
var evnt_name_before=""//Used before the event
var evnt_name_after=""//Used after the event
var evnt_duration=7 //Event duration in days
var countdown_time=Date.UTC(2011,6,18, -5);//Year, mont, day. Dont know why the mont is minus 1.
var now=new Date();
var now_millisecs=now.valueOf();