Skip to content

Instantly share code, notes, and snippets.

<?php
/*
VTY - Database Manager For Mysql
............................................................................
: Version : 1.6 (18.04.2007) :
: Language : English, Turkce, Italian, Spanish :
: URL : http://www.kutukutu.com/vty/ :
: Mail : [email protected] :
@saga
saga / gist:2951606
Created June 19, 2012 00:19
bayimg uimge-project
# -*- coding: utf-8 -*-
import base
class Host( base.BaseHost ):
short_key = 'ba'
long_key = 'bayimg'
host='bayimg.com'
action = 'http://upload.%s/upload'%host
form = {
'code':'666',
'tags':'guimge',
local _class={}
function class(super)
local class_type={}
class_type.ctor=false
class_type.super=super
class_type.new=function(...)
local obj={}
do
local create
-- cothread.lua
local co = coroutine
local error = error
local setmetatable = setmetatable
local unpack = unpack
local assert = assert
local type = type
local pairs = pairs
@saga
saga / gist:3340225
Created August 13, 2012 12:31
Lua coroutine download files
require "socket"
function download (host, file, port)
port = port or 80
print (host, file, port)
local connectStatus, myConnection = pcall (socket.connect,host,port)
if (connectStatus) then
myConnection:settimeout(0.01) -- do not block you can play with this value
local count = 0 -- counts number of bytes read
-- May be easier to do this LuaSocket's HTTP functions
@saga
saga / Scheduler.lua
Created September 7, 2012 03:34 — forked from Deco/coroutine_scheduler.lua
Lua Coroutine Scheduler
pcall(require,"socket")
Scheduler = setmetatable({}, {
__call = function(class)
return setmetatable({
threads = {},
}, class)
end
})
Scheduler.__index = Scheduler
@saga
saga / gist:3791807
Created September 27, 2012 02:21
outputdebugstring python
# Original code by Dan Brotherston
import sys
import mmap
import struct
import win32event
import thread
import time
def OutputDebug(threadName, delay):
buffer_ready = win32event.CreateEvent(None, 0, 0, "DBWIN_BUFFER_READY")
@saga
saga / gist:3792277
Created September 27, 2012 05:18
outputdebugstring C++
TCHAR bufferWill[512];
_stprintf(bufferWill, TEXT(" ## [%s] BEGIN ##L%d\n"), __FUNCTION__,
,__LINE__);
::OutputDebugString(bufferWill);
// OLE2W(message)
#!/usr/bin/env python
import time
import sys
import os
import json
from flask import Flask, Request, Response
from werkzeug.routing import BaseConverter
import urllib2
from flask import Flask
import platform
from flask import Request, Response
from werkzeug.routing import BaseConverter
import time
import sys
import json
import urllib2