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
declare @starttime datetime, @endtime datetime, @runtime int | |
set @starttime = getdate() | |
/*la consulta va aquí... select, update, insert, SP, etc.*/ | |
set @endtime = getdate() | |
set @runtime = datediff(ms,@starttime,@endtime) |
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 sys | |
import subprocess | |
import tempfile | |
import urllib | |
text = sys.stdin.read() | |
chart_url_template = ('http://chart.apis.google.com/chart?' | |
'cht=qr&chs=300x300&chl={data}&chld=H|0') | |
chart_url = chart_url_template.format(data=urllib.quote(text)) |
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' |
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
@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
<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
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
<?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
#!/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
import time | |
from urllib import urlopen | |
from urllib import urlretrieve | |
import os | |
import sys | |
import hashlib | |
from threading import Thread | |
class worker(Thread): |