> % rustc hello.rs --target=psp -lpspdebug -lpspdisplay -lpspge -lm -lc -lpspuser -lgcc
> % psp-fixup-imports hello && psp-prxgen hello hello.prx
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
for i in *.wav; do lame -b 320 -h "${i}" "${i%.wav}.mp3"; done |
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
''' | |
xform.py | |
Exposes the xform class: a simple way to set maya position, rotation and similar properties with point notation. | |
from xform import Xform | |
example = Xform('pCube1') | |
print example.translation | |
# [0,0,0] |
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 sh | |
# Download lists, unpack and filter, write to gzipped file | |
curl -s https://www.iblocklist.com/lists.php \ | |
| grep -A 2 Bluetack \ | |
| sed -n "s/.*value='\(http:.*\)'.*/\1/p" \ | |
| xargs wget -O - \ | |
| gunzip \ | |
| egrep -v '^#' \ | |
| gzip - > bt_blocklist.gz |
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 | |
# -*- coding: utf-8 -*- | |
r"""Support for IEEE 754 half-precision binary floating-point format: binary16. | |
>>> [binary16(f) for f in [0.006534, -.1232]] == [b'\xb0\x1e', b'\xe2\xaf'] | |
True | |
""" | |
from __future__ import division | |
import struct | |
from math import copysign, frexp, isinf, isnan, trunc |
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
# Check if Maya is running in Batch mode or with a GUI | |
# A return value of 1 means Batch Mode, 0 means GUI mode | |
def checkMayaGuiBatchMode(): | |
""" | |
Maya tip on detecting Maya Batch mode is from Michael Scarpa's blog post "MEL Sillyness": | |
http://www.scarpa.name/2010/12/16/mel-sillyness/ | |
""" | |
# Check if Maya is running in batch mode or with a GUI | |
import maya.OpenMaya |
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 PIL import Image | |
import OpenEXR | |
import Imath | |
import numpy | |
import numexpr as ne | |
FLOAT = Imath.PixelType(Imath.PixelType.FLOAT) | |
def exr_to_array(exrfile): |
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
#!/bin/bash | |
#Make sure we’re running with root permissions. | |
if [ `whoami` != root ]; then | |
echo Please run this script using sudo | |
echo Just type “sudo !!” | |
exit | |
fi | |
#Check for 64-bit arch | |
if [uname -m != x86_64]; then |
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 maya.cmds as cmds | |
import maya.OpenMaya as OpenMaya | |
import math | |
# Find if object located within camera frustum | |
# Usage: | |
# from obj_in_frust import in_frustum | |
# in_frustum('camera1', 'pCube1') | |
class Plane(object): |
OlderNewer