View AutoHotKey.ahk
; Capslock remapping should be done in the registry to avoid key repeat issues in here
; Capslock::Ctrl
WheelUp::
Send {WheelDown}
Return
WheelDown::
Send {WheelUp}
Return
View light_vertex_colors.py
import bpy
import math
import mathutils
bl_info = {
'name': 'Light Vertex Colors',
'author': 'Tamas Kemenczy',
'version': (0, 1),
'blender': (2, 6, 3),
'location': 'View3D > Specials > Light Vertex Colors',
View light_vertices.py
import bpy
import math
import mathutils
def magnitude(v):
return math.sqrt(v.x ** 2 + v.y ** 2 + v.z ** 2)
COLOR = mathutils.Color((1, 1, 1))
RADIUS = 10
View acronym.py
#!/usr/bin/env python
import sys
last = ''
punc = ','
while True:
c = sys.stdin.read(1)
if c:
View vector2.js
Vector2.prototype = {
init: function(x, y) {
this.x = x;
this.y = y;
},
copy: function() {
return new Vector2(this.x, this.y);
},
View gist:3859647
$('.art').each(function() {
var el, im, width, height, paper;
width = $(this).data('width');
if (width)
width += 'px';
height = $(this).data('height');
if (height)
height += 'px';
if (window.Raphael && (Raphael.svg || Raphael.vml)) {
el = $('<div>').addClass('svg');
View boxfill.js
Boxfill = function(el) {
this.init(el);
};
Boxfill.prototype = {
init: function(el) {
this.el = el;
this.el.style.overflow = 'hidden';
if (!this.el.style.position)
View preload.js
var Preloader = function(sources, oncomplete, onload) {
this.init(sources, oncomplete, onload);
}
Preloader.prototype = {
init: function(sources, oncomplete, onload) {
this.sources = sources;
this.oncomplete = oncomplete
this.onload = onload;
this.images = [];
View raphael.py
import re
import sys
import json
import math
from lxml import etree
# TODO
# - text nodes
# - image nodes
# - transforms
View arc.js
function arc(x, y, rx, ry, from, to) {
var ar = from * Math.PI / 180;
var ax = x + rx * Math.cos(ar);
var ay = y + ry * Math.sin(ar);
var br = to * Math.PI / 180;
var bx = x + rx * Math.cos(br);
var by = y + ry * Math.sin(br);
var sweep = (to - from) > 180 ? 1 : 0;