Skip to content

Instantly share code, notes, and snippets.

View Kimau's full-sized avatar

Claire Blackshaw Kimau

View GitHub Profile
@Kimau
Kimau / Minecraft Objectives
Created September 21, 2014 12:59
Magical Objectives Book
/scoreboard objectives add #lifeTime stat.timeSinceDeath Time Alive
/scoreboard objectives add #deaths stat.deaths Deaths
/scoreboard objectives add #mobKills stat.mobKills Mob Kills
/scoreboard objectives add #mineIron stat.mineBlock.minecraft.iron_ore Iron Mined
/scoreboard objectives add #mineDiamond stat.mineBlock.minecraft.diamond_ore Diamonds Mined
/scoreboard objectives add #mineObsidian stat.mineBlock.minecraft.obsidian Obsidian Mined
/scoreboard objectives add #mineCobble stat.mineBlock.minecraft.cobblestone Cobblestone Mined
/scoreboard objectives add #killCreeper stat.killEntity.Creeper Creepers Killed
using UnityEngine;
using System.Runtime.InteropServices;
class TestBox: MonoBehaviour {
[DllImport ("CubedNative")]
private static extern float FooPluginFunction ();
[DllImport ("CubedNative")]
private static extern void FooPluginVert(System.IntPtr ptr);
struct Vec3 {
int excess;
float xyz[3];
};
Vec3 p{1, 0.2f, 1.0f, 2.0f};
using UnityEngine;
using System.Collections;
[ExecuteInEditMode]
public class helperConstrainToPoly : MonoBehaviour {
public PolygonCollider2D col;
Vector2 oldpos, iconpos;
void OnDrawGizmos(){
@Kimau
Kimau / DONGERS
Created October 20, 2015 14:56
Dongers
( ͡⚆ل͜⚆)ノ⚲
ᗜԅ(⇀︿⇀)ᓄ-¤]═────
✿∗˵╰༼✪ᗜ✪༽╯˵∗✿
(つ・◡・)つ
ᕦ(눈_눈)ᕗ
(⌐▀͡ ̯ʖ▀)
ζ༼Ɵ͆ل͜Ɵ͆༽ᶘ
ヽ( ⌐□益□)/
(▀̿̿Ĺ̯̿̿▀̿ ̿)
⋋|།'͡ᴼ╭͜ʖ╮͡ᴼ'།|⋌
@Kimau
Kimau / gist:3a94ade26236745c6d35
Created March 23, 2016 10:51
Joanne Harris @Joannechocolat #TenTweetsOnWritingDialogue
Joanne Harris @Joannechocolat #TenTweetsOnWritingDialogue
1. Dialogue is one of the hardest things for a writer to address. And getting it right makes a huge difference
2. Use sections of dialogue to break up long passages of narrative. It gives a lighter feel straightaway.
3. Don't write pages of unbroken dialogue, though. (Unless you're writing a screenplay)
4. Your primary school teacher probably told you to vary words for "he/she said." DON'T
5. "He whispered", "she declared", or (God forbid) "he ejaculated" all draw attention from WHAT is being said.
6. For the same reason, limit your adverbs. Good dialogue should already suggest HOW the line is delivered.
7. Read dialogue aloud. Take out anything that slows it down (especially adverbs & repetitions of "s/he said")
8. You'll find that you can often dispense altogether with "s/he said", as long as you still know who's talking.
9. (a) You can replace "s/he said" by actions to make this clearer.
@Kimau
Kimau / test.cs
Last active December 19, 2016 20:17
WWWForm form = new WWWForm();
form.AddField("frameCount", Time.frameCount.ToString());
form.AddBinaryData("fileUpload", bytes, "screenShot.png", "image/png");
WWW w = new WWW(screenShotURL, form);
yield return w;
if (!string.IsNullOrEmpty(w.error))
print(w.error);
else
@Kimau
Kimau / gridHack.cs
Last active December 20, 2016 12:50
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class GridSpawner : MonoBehaviour {
public Vector3 Spacing;
public GameObject ObjToSpawn;
public string PropToSet;
public List<string> Values;
@Kimau
Kimau / gist:1f79a2c1e8e391f8a6e3bf2d716e1169
Created January 15, 2017 12:41
Blender Scripting Keyframe Example
for o in bpy.data.objects:
if o.name.find("Sphere_cell") == 0:
o.rigid_body.restitution = 0.8
for i in range(32):
o.keyframe_delete("rigid_body.enabled",frame=i)
o.keyframe_delete("rigid_body.kinematic",frame=i)
o.keyframe_insert("rigid_body.enabled",frame=25)
o.keyframe_insert("rigid_body.kinematic",frame=25)
o.keyframe_insert("rigid_body.enabled",frame=28)
o.keyframe_insert("rigid_body.kinematic",frame=28)
#include <vector>
#include <stdlib.h>
#include <iostream>
#include <chrono>
struct x {
int a;
float q,w,e;
};