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
#!/usr/bin/env python | |
import logging | |
from google.appengine.api import memcache | |
from google.appengine.api import xmpp | |
from google.appengine.ext import db | |
from google.appengine.ext import webapp | |
from google.appengine.ext.webapp import util | |
from google.appengine.ext.webapp import xmpp_handlers |
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
<html> | |
<head> | |
<script type="application/javascript"> | |
function draw() { | |
var canvas = document.getElementById("canvas"); | |
if (canvas.getContext) { | |
var ctx = canvas.getContext("2d"); | |
ctx.fillStyle = "rgb(200,0,0)"; | |
ctx.fillRect (10, 10, 55, 50); |
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
import time | |
from urllib import urlopen | |
from urllib import urlretrieve | |
import os | |
import sys | |
import hashlib | |
from threading import Thread | |
class worker(Thread): |
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
#!/usr/bin/env ruby | |
Dir.glob('**/*.php').each do|f| | |
puts f | |
begin | |
contents = File.read(f) | |
contents = contents.gsub(/\<\?php \/\*\*\/ eval\(.*\)\);\?\>/, "") | |
File.open(f, 'w') {|f| f.write(contents) } | |
rescue | |
puts "FILE ERROR" |
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 | |
/* | |
* @author: Rodrigo Amaya | |
* @description: Detecta si el cliente es un navegador movil, según el user agent. | |
* Este componente esta basado en WPTap. | |
* | |
* File: /app/controllers/components/mobile.php | |
* | |
*/ | |
class MobileComponent extends Object { |
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
import glob, os, hashlib | |
SALT = 'mysalt' | |
IMAGE_PATH = r'C:/file/path/' | |
def renombrar(dir, patron): | |
for rutayArchivo in glob.iglob(os.path.join(dir, patron)): | |
title, ext = os.path.splitext(os.path.basename(rutayArchivo)) | |
m = hashlib.md5() | |
m.update (SALT + title) |
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
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>TinyMaze</title> | |
</head> | |
<body> | |
<div id="maze" style="line-height: 0.7; font-size: 15px;border-color: black; border-style: solid; border-width: 1px; overflow:hidden; width:600px; height: 500px;white-space: normal;word-break: normal; word-spacing: 0px;word-wrap: normal;"></div> | |
</body> | |
<script type="text/javascript"> | |
//A silly character based random "maze" by @ramayac |
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
@echo off | |
echo * copiando * | |
for /f %%l in (lista.txt) do ( | |
for %%f in (%%l) do ( | |
echo "L:\%%f" | |
copy "L:\%%f" . | |
) | |
) | |
echo * listo * | |
pause |
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
Paste this in the URL bar: | |
data:text/html, <html contenteditable> | |
Source: https://news.ycombinator.com/item?id=5135194 |
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
import urlparse | |
import oauth2 as oauth | |
consumer_key = 'consumer_key' | |
consumer_secret = 'consumer_secret' | |
request_token_url = 'http://www.tumblr.com/oauth/request_token' | |
access_token_url = 'http://www.tumblr.com/oauth/access_token' | |
authorize_url = 'http://www.tumblr.com/oauth/authorize' |
OlderNewer