View blender_apply_xform.py
import bpy
from bpy import context
import mathutils
from mathutils import Vector,Quaternion,Matrix
import math
#obj = bpy.data.objects["Cube"] # particular object by name
obj = bpy.context.scene.objects.active # active object
# setup whatever matrix
View lock.py
import gi
gi.require_version('Gtk', '3.0')
from gi.repository import Gtk
from gi.repository import GLib
i=0
def func(obj):
global i
win.set_title("i: %d" % i)
View python_dialog_gauge.py
import time
import subprocess as sp
enc = 'UTF-8'
p = sp.Popen(['dialog', '--gauge', 'hello', '6', '75', '0'], stdin=sp.PIPE)
for i in range(0, 100):
p.stdin.write(bytes(str(i)+"\n", enc))
p.stdin.flush()
View img.htm
<!DOCTYPE html>
<html>
<head>
<script src='js/jquery.js'></script>
<script src='js/bicubicInterpolation.js'></script> <!-- https://github.com/sukhoi1/ie-bicubic-img-interpolation-plugin -->
<script type='text/javascript'>
$(function() {
var ua = window.navigator.userAgent;
var msie = ua.indexOf('MSIE ');
View PKGBUILD
# Maintainer: Maxime Gauduin <alucryd@archlinux.org>
pkgname=rpcs3-git
pkgver=0.0.0.9.r262.b7eda71
pkgrel=1
pkgdesc='A Sony PlayStation 3 emulator'
arch=('x86_64')
url='https://github.com/DHrpcs3/rpcs3'
license=('GPL2')
depends=('boost-libs' 'gcc-libs' 'glew' 'glibc' 'libgl' 'libx11' 'openal'
View PKGBUILD
# Maintainer: Kyle Keen <keenerd@gmail.com>
pkgname='solvespace-git'
pkgver=r795.1e2f199
pkgrel=1
pkgdesc="SOLVESPACE is a parametric 3d CAD program."
arch=('i686' 'x86_64')
url='http://solvespace.com/'
license=('GPL3')
depends=('libpng' 'json-c' 'glew' 'gtkmm')
View ClearBitmapData.cs
void ClearBitmapData(BitmapData bd, byte[] color)
{
var pf = bd.PixelFormat;
var size = sizeof(byte);
if(pf == PixelFormat.Format16bppRgb555)
size *= 2;
else if(pf == PixelFormat.Format24bppRgb)
size *= 3;
else if (pf == PixelFormat.Format32bppArgb)
View gdrive-sync.rb
#!/usr/bin/env ruby
require 'shellwords'
$LAST_MOD_FILE = 'GDRIVE_SYNC_LAST_MOD'
# date "+%s"
$LAST_MOD = Time.at 0
# Find the last modification time
View get_relative_path.php
function getRelativePath($base = '/', $target = '/')
{
$out = array();
$base_ex = explode('/', $base);
$target_ex = explode('/', $target);
//Find common ancestor
$max = min(count($base_ex), count($target_ex));
for($i = 0; $i < $max; $i++)
View proxy.rb
#!/usr/bin/env ruby
# A quick and dirty implementation of an HTTP proxy server in Ruby
# because I did not want to install anything.
#
# Copyright (C) 2009 Torsten Becker <torsten.becker@gmail.com>
require 'optparse'
require 'socket'
require 'uri'