Skip to content

Instantly share code, notes, and snippets.

View Kimau's full-sized avatar

Claire Blackshaw Kimau

View GitHub Profile
package main
import (
"encoding/binary"
"log"
"math/rand"
"time"
"github.com/kimau/go-osc/osc"
)
@Kimau
Kimau / chat.js
Last active August 16, 2019 15:01
Simple Twitch Helper for Chat WebSock
"use strict";
// Connects to Chat via Websocket and then trigger on command words
// Triggers are [[regex, callback(msg)]]
let chatScanner = function chatScanner(channel_name, listOfTriggers) {
this.channel_name = channel_name;
this.listOfTriggers = listOfTriggers;
}
chatScanner.prototype.open = async function open() {
@Kimau
Kimau / gist:6cd397fa5eb20562b2ee835a10945ada
Last active July 10, 2018 13:23
Why cars and the apocalypse sucks - Writers pay attention

Why cars and the apocalypse sucks

Credit to /u/RaceHard on the r/Colony

Now lets get going from the get go on establishing two things:

(This only affects the poor SOB's that are not with the occupation.)

554 days have passed since the arrival (BY THE MOST CONSERVATIVE COUNTS)

Fuel has a shelf life and it ain't pretty when its bad.

#include <vector>
#include <stdlib.h>
#include <iostream>
#include <chrono>
struct x {
int a;
float q,w,e;
};
@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)
@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 / 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 / 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 / DONGERS
Created October 20, 2015 14:56
Dongers
( ͡⚆ل͜⚆)ノ⚲
ᗜԅ(⇀︿⇀)ᓄ-¤]═────
✿∗˵╰༼✪ᗜ✪༽╯˵∗✿
(つ・◡・)つ
ᕦ(눈_눈)ᕗ
(⌐▀͡ ̯ʖ▀)
ζ༼Ɵ͆ل͜Ɵ͆༽ᶘ
ヽ( ⌐□益□)/
(▀̿̿Ĺ̯̿̿▀̿ ̿)
⋋|།'͡ᴼ╭͜ʖ╮͡ᴼ'།|⋌
using UnityEngine;
using System.Collections;
[ExecuteInEditMode]
public class helperConstrainToPoly : MonoBehaviour {
public PolygonCollider2D col;
Vector2 oldpos, iconpos;
void OnDrawGizmos(){