Skip to content

Instantly share code, notes, and snippets.

@jagt
jagt / install-ipython-for-maya-2015.md
Created December 16, 2014 19:10
How to install IPython for Maya 2015.

How to install IPython for Maya 2015 mayapy on Windows.

So somehow you want to install IPython for mayapy. Make sure you have mayapy.exe on your path or you can invoke it somehow.

  1. Grab ez_setup.py here. Run it with mayapy. You can't get pip as mayapy is built with broken ssl support, which is needed for pip bootstrapping.

     mayapy ez_setup.py
    
  2. Grap latest pyreadline-x.x.zip here on PyPI. Install it offline. You can't install online as mayapy is lacking ssl.

@jagt
jagt / Blur.shader
Last active August 29, 2015 14:10 — forked from jpsarda/Blur.shader
Shader "Futile/Blur"
{
Properties
{
_MainTex ("Base (RGB) Trans (A)", 2D) = "white" {}
_Color ("Main Color", Color) = (1,0,0,1.5)
_BlurAmount ("Blur Amount", Range(0,02)) = 0.0005
}
Category
Shader "Custom/yar" {
Properties {
_ColorLow ("Color Low", COLOR) = (1,1,1,1)
_ColorHigh ("Color High", COLOR) = (1,1,1,1)
_yPosLow ("Y Pos Low", Float) = 0
_yPosHigh ("Y Pos High", Float) = 10
_GradientStrength ("Graident Strength", Float) = 1
_EmissiveStrengh ("Emissive Strengh ", Float) = 1
_ColorX ("Color X", COLOR) = (1,1,1,1)
_ColorY ("Color Y", COLOR) = (1,1,1,1)
// Unlit alpha-blended shader.
// - no lighting
// - no lightmap support
// - no per-material color
// - accepts a masking texture of the scale of screen
Shader "Unlit/Transparent With Mask" {
Properties {
_MainTex ("Base (RGB) Trans (A)", 2D) = "white" {}
_MaskTex ("Mask Tex", 2D) = "white" {}
// Unlit alpha-blended shader with MainColor
// - no lighting
// - no lightmap support
// - with holes
Shader "Unlit/Transparent With Holes" {
Properties {
_MainTex ("Base (RGB) Trans (A)", 2D) = "white" {}
_Radius ("Hole Radius", Float) = 50.0
_CutOff1 ("Cut Off Ratio, ranges from [0, 1", Float) = 0.6
/*
* Compile UnityScripts in "<ProjectRoot>/<ScriptsDirName>" into DLL, Windows and Editor Only
*
*/
using UnityEngine;
using UnityEditor;
using System;
using System.IO;
using System.Collections.Generic;
@jagt
jagt / cnv.c
Created September 30, 2014 07:27
print int as float for memory edit
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char **argv) {
int i;
float f;
if (argc < 2)
{
puts("usage: cnv 1065353216\n");
@jagt
jagt / superlua.c
Created April 13, 2014 07:56
small lua ext for playing around.
// small lua ext for playing around.
#include <stdio.h>
#include <stdlib.h>
#include "lua.h"
#include "lualib.h"
#include "lauxlib.h"
#define err(msg) do {fprintf(stderr, "error: %s\n", (msg)); exit(1);} while (0)
int super_bind(lua_State *L) {
return 0;
@jagt
jagt / jmp.c
Created March 31, 2014 15:48
setjmp/longjmp and volatile
#include <setjmp.h>
#include <stdio.h>
jmp_buf buf;
void jmper() {
// only variables marked as volatile can be seen as reiable
// written after jmp, as they are written to ram
volatile int local = 1;
if (!setjmp(buf)) {
printf("pre set: %d\n", local); // 1