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
// Run this on the Toggl API page (https://www.toggl.com/public/api) from your javascript console. (In a modern browser) | |
// Dirty as hell, but I didn't expect to actually add a UI. | |
function OnLoad() { | |
var rgxp = /(?:-d ("|)(.*?)\1)? -X (POST|GET|PUT|DELETE) (https:\/\/www\.toggl\.com\/api\/v\d\/[^ \r\n\t]+)\s*$/ig, | |
typof = function(x) { var s, t = typeof(x); return t === 'object' ? (s = Object.prototype.toString.call(x)).substring(8, s.length - 1).toLowerCase() : t; }, | |
resultWrap = $('<div />').css({ | |
position: 'fixed', | |
left: Math.floor(($(window).innerWidth() * 0.2) / 2) + 'px', | |
top: Math.floor(($(window).innerHeight() * 0.2) / 2) + 'px', |
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
from cx_Freeze import setup, Executable | |
from os import path | |
setup( | |
name = 'PyCmd', | |
version = '0.8', | |
description = 'Smart windows shell', | |
executables = [ | |
Executable('PyCmd.py', | |
initScript=path.join(path.abspath(path.dirname(__file__)), 'pycmd_cx_initscript.py') |
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
#------------------------------------------------------------------------------ | |
# Console.py | |
# Initialization script for cx_Freeze which manipulates the path so that the | |
# directory in which the executable is found is searched for extensions but | |
# no other directory is searched. It also sets the attribute sys.frozen so that | |
# the Win32 extensions behave as expected. | |
#------------------------------------------------------------------------------ | |
import os | |
import sys |
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 os | |
import sys | |
import zipimport | |
sys.frozen = True | |
sys.path = sys.path[:4] | |
m = __import__("__main__") | |
importer = zipimport.zipimporter(INITSCRIPT_ZIP_FILE_NAME) | |
if INITSCRIPT_ZIP_FILE_NAME != SHARED_ZIP_FILE_NAME: |
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 | |
# encoding: utf-8 | |
""" | |
rdll.py | |
Created by Charles on 10/25/12. | |
This program is free software. It comes without any warranty, to | |
the extent permitted by applicable law. You can redistribute it | |
and/or modify it under the terms of the Do What The Fuck You Want | |
To Public License, Version 2, as published by Sam Hocevar. See |
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
# c_void_p PyMem_Malloc(c_size_t) | |
PyMem_Malloc = _dll.PyMem_Malloc | |
PyMem_Malloc.restype = c_void_p | |
PyMem_Malloc.argtypes = [ c_size_t ] | |
# c_void_p PyMem_Realloc(c_void_p, c_size_t) | |
PyMem_Realloc = _dll.PyMem_Realloc |
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
BITS 32 | |
%include 'type-conversion.asm' | |
section .bss | |
global _hDllBase | |
_hDllBase resd 1 | |
SECTION .data | |
sDllName db u('procrewriter.dll'), 0 | |
SECTION .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
# -*- coding: utf-8 -*- | |
import mox | |
import subprocess | |
try: | |
import unittest2 as unittest | |
except ImportError: | |
import unittest |
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
#include <WinSDKVer.h> | |
#define _MBCS 1 | |
#define MBCS 1 | |
// Target Windows 2000 & higher | |
#define WINVER 0x0500 | |
#define _WIN32_WINNT 0x0500 | |
// Speed up build process with minimal headers. |