Skip to content

Instantly share code, notes, and snippets.

View r618's full-sized avatar

r618

View GitHub Profile
#if UNITY_EDITOR
using System.Reflection;
using UnityEngine;
using UnityEditor;
public class FontSwitcher : EditorWindow
{
[MenuItem("Font/Show Window")]
public static void ShowFontWindow()
{
[google dice roller foe die rolls]
Player:
You’re no longer a friendly assistant. You are now a DM for a new D&D 3e based campaign of your choosing. It will take place near Baldur's Gate thoguh.
There is one player in the room with you. You will be my DM. You will tell what to do, including when die rolls are needed. Ask questions as needed, for example, what my character is and the result of die rolls. Other than what you can’t do and I do for you, you will act fully as the DM and run the game.
ChatGPT DM:
Great, let's get started! Before we begin, I'll need to know a bit more about your character. What race and class are you playing? What are their abilities and skills?
Also, would you like to play as a pre-made character or would you prefer to create your own? If you want to create your own character, we'll need to spend some time generating stats and choosing equipment.
// https://cheapbotsdonequick.com/source/iamnotsonicpi
// @iamnotsonicpi
{
"origin": ["#script# \n\n \\# Run this in \\#SonicPi - get it at http://sonic-pi.net/"]
, "script" :["use_synth #synth# \n #live_loop#", "#live_loop#"]
, "live_loop": [ "#random_seed# \n live_loop #body_name# do \n #body# \n end"]
, "body_name" : [":foo", ":mary", ":alice", ":bob", ":jared", ":donald", ":bar", ":baz", ":bax", ":jimmy", ":bruce", ":michael", ":dude", ":eddie", ":karol", ":richard", ":samuel", ":xoxo", ":ian", ":spoilt_child", ":spoilt_adult", ":gordon", ":vyber", ":kicked", ":yendor", ":chick", ":mark", ":jordan", ":n", ":l", ":green", ":summer", ":autumn", ":home"]
, "body" : ["#play# \n sleep #sleep_value#", "with_fx #fx# do \n #play# \n sleep #sleep_value# \n end"]
, "sleep_value": ["1","2","3","4","5","6","7","0.5", "0.25", "0.125", "0.5", "0.25", "0.125"]
using UnityEditor;
public class ReserializeAllMenuItem
{
[MenuItem("Development/Reserialize all items")]
static void ReserializeAll()
{
AssetDatabase.ForceReserializeAssets();
}
}
@r618
r618 / mserve
Last active January 25, 2020 02:26
[{elementary OS} serve music]
#!/bin/bash
cd ~/Music && python -m SimpleHTTPServer 8080
@r618
r618 / mx11vnc
Last active January 25, 2020 02:26
[x11vnc server setup]
#!/bin/bash
# x11vnc -storepasswd
# -rfbauth ~/.vnc/passwd
# ||
x11vnc -usepw -auth guess -forever -loop -noxdamage -repeat -rfbport 59000 -shared
@r618
r618 / ShipCamera.cs
Created September 29, 2018 10:37 — forked from davehampson/ShipCamera.cs
Framerate independent blend
using UnityEngine;
public class ShipCamera : MonoBehaviour
{
public GameObject m_Ship;
public Vector3 m_RelativePos;
void LateUpdate()
{
//float scale = 0.05f; // Framerate dependent code, bad.
@r618
r618 / AudioInputLasp.cs
Created October 21, 2017 12:01
example of some LASP <-> Unity
/*
* just example of tighter LASP <-> Unity exchange
*/
using System.Collections;
using UnityEngine;
using UnityEngine.Events;
[RequireComponent(typeof(AudioSource))]
public class AudioInputLasp : MonoBehaviour

Keybase proof

I hereby claim:

  • I am r618 on github.
  • I am r618 (https://keybase.io/r618) on keybase.
  • I have a public key ASCRG6Jzm4syu1H5IJv2tzTlo0yFpBdaQhZk-CeUNtLKQQo

To claim this, I am signing this object:

@r618
r618 / now-play-this.rb
Created June 3, 2016 10:38 — forked from AlexandreRangel/now-play-this.rb
Sonic Pi 2.10 music code
use_synth :growl
64.times do
play rrand(30,90),
attack: rrand(4,16), sustain: rrand(2,4),
release: rrand(4,24), slide_shape: 3,
cutoff: rrand(62,112),
cutoff_slide: [2,4,8,12].choose,
res: rrand(0,0.99),
res_slide: [2,4,6].choose,
pan: rrand(-0.4,0.4),