🤷♂️
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 math, os, time, bpy, random, mathutils, re, ctypes, struct, binascii, zlib, tempfile | |
from bpy import ops | |
from bpy.props import * | |
def GetMaterialTextures(Material): | |
if Material: | |
#Create a list of Textures that have type "IMAGE" | |
ImageTextures = [Material.texture_slots[TextureSlot].texture for TextureSlot in Material.texture_slots.keys() if Material.texture_slots[TextureSlot].texture.type == "IMAGE"] | |
#Refine a new list with only image textures that have a file source |
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
# Sandy Actionscript Quick import into blender 2.63 | |
# Script by David E Jones, http://davidejones.com | |
# Purpose to help cogweb & Ricardo Cruz import models | |
import bpy | |
global verts,faces,norms,uvs | |
verts = [] | |
faces = [] | |
norms = [] |
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
(function($){ | |
$.fn.imageReveal = function(options) { | |
var defaults = { | |
width: 493, | |
height: 308, | |
useImageSize: false | |
}; | |
var options = $.extend(defaults, options); | |
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
RewriteCond %{REQUEST_URI} !=/maintenance.html | |
RewriteCond %{REQUEST_URI} !=/login.cfm | |
RewriteCond %{REQUEST_URI} !^/mobile/ | |
RewriteCond %{REQUEST_FILENAME} !\.(gif|jpe?g|png|css|js|swf|xml|ttf|eot|woff|svg|pdf)$ | |
RewriteCond %{HTTP_COOKIE} !^.*splash.*$ [NC] | |
RewriteRule ^(.*)$ /maintenance.html [R=307,NC,L] |
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 django.contrib.admin.views.main import ChangeList | |
# make the partner select pass through without ?e=1 | |
class UserChangeList(ChangeList): | |
def get_filters_params(self, params=None): | |
params = super(UserChangeList, self).get_filters_params(params) | |
if 'userprofile__partners__exact' in params: | |
del params['userprofile__partners__exact'] | |
return params | |
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 | |
instance_profile=`curl http://169.254.169.254/latest/meta-data/iam/security-credentials/` | |
aws_access_key_id=`curl http://169.254.169.254/latest/meta-data/iam/security-credentials/${instance_profile} | grep AccessKeyId | cut -d':' -f2 | sed 's/[^0-9A-Z]*//g'` | |
aws_secret_access_key=`curl http://169.254.169.254/latest/meta-data/iam/security-credentials/${instance_profile} | grep SecretAccessKey | cut -d':' -f2 | sed 's/[^0-9A-Za-z/+=]*//g'` | |
token=`curl -s http://169.254.169.254/latest/meta-data/iam/security-credentials/${instance_profile} | sed -n '/Token/{p;}' | cut -f4 -d'"'` | |
file="somefile.deb" | |
bucket="some-bucket-of-mine" | |
date="`date +'%a, %d %b %Y %H:%M:%S %z'`" |
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
// Invisible Man.tXo - SLES_504.35 PAL | |
gametitle=Tony Hawks Pro Skater 3 | |
// toggle on console (bottom right yellow text) | |
patch=1,EE,0097FFE8,word,00000000 | |
// enable debug menu (in game) | |
// note this is out of the box so some menus may freeze | |
patch=1,EE,009B70D0,word,4EAC0516 | |
patch=1,EE,009B70D4,word,00D90291 |
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 urllib | |
def encoded_dict(in_dict): | |
out_dict = {} | |
for k, v in in_dict.iteritems(): | |
if isinstance(v, unicode): | |
v = v.encode('utf8') | |
elif isinstance(v, str): | |
# Must be encoded in UTF-8 | |
v.decode('utf8') |
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
var uiControlModule = angular.module('uiControlModule',['memberModule','datatables']); | |
uiControlModule.controller('testController', ['$rootScope', '$scope', 'DTOptionsBuilder', 'DTColumnDefBuilder', function($rootScope, $scope, DTOptionsBuilder, DTColumnDefBuilder) { | |
var vm = this; | |
$scope.persons = [ | |
{id:1, firstName:'David', lastName:'Jones'}, | |
{id:2, firstName:'Michael', lastName:'Whetton'}, | |
{id:3, firstName:'Trevor', lastName:'Veralrud'}, | |
{id:4, firstName:'Jeffrey', lastName:'Barron'}, |
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 pyglet | |
from pyglet.gl import * | |
from ctypes import create_string_buffer, cast, sizeof, c_int, c_char, pointer, byref, POINTER | |
width = 800 | |
height = 600 | |
ratio = float(width) / float(height) | |
window = pyglet.window.Window(config=Config(major_version=2, minor_version=2), width=width, height=height, vsync=True) | |
program = glCreateProgram() | |
vertex_shader = b''' |
OlderNewer