Skip to content

Instantly share code, notes, and snippets.

View drusepth's full-sized avatar
💭
hacking away on notebook.ai

Andrew Brown drusepth

💭
hacking away on notebook.ai
View GitHub Profile
require 'discordrb'
require 'dotenv'
require 'openai' # ruby-openai gem, not openai gem
require 'optparse'
require 'yaml'
require 'httparty'
def parse_options
options = {}
OptionParser.new do |opts|
void Start()
{
StartCoroutine(Script());
}
private void Update()
{
if (waitingForClick && (Input.GetMouseButtonDown(0) || Input.GetKeyDown(KeyCode.Space)))
waitingForClick = false;
}
using UnityEditor;
using UnityEngine;
[CustomPropertyDrawer(typeof(SerializableDictionary<,>))]
public class SerializableDictionaryDrawer : PropertyDrawer
{
private const float Padding = 2f;
public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
{
require 'csv'
export_folder = "./export"
FileUtils.mkdir_p(export_folder) unless File.exists?(export_folder)
exported_tables = []
skipped_tables = []
puts "Starting CSV export"
ActiveRecord::Base.connection.tables.each do |table_name|
file = "#{export_folder}/#{table_name}.csv"
using System.Collections;
using System.Collections.Generic;
using UnityEditor;
using UnityEngine;
public class HoverboardController : MonoBehaviour
{
public float multiplier; // How much force to exert on the ground to keep afloat
// This would be super cool to lerp off hoverboard battery level
// Potential game loop: find batteries?
public class CardColumnManager : MonoBehaviour
{
public Stack<GameObject> card_stack;
void Start()
{
card_stack = new Stack<GameObject>();
}
public void AddCard(GameObject card)
import random
import re
#@title Prompt Settings
adjective = [
'Fierce', 'Scary', 'Interesting', 'Novel', 'Furry', 'Long-haired', 'Short-haired',
'Electric', 'Plasma', 'Humanoid', 'Insectoid', 'Alien', 'Tundra', 'Siberian', 'Ancient',
'Gigantic', 'Tiny', 'Small', 'Large', 'Oversized', 'Wild', 'Shadowy', 'Evil', 'Angelic',
'Good', 'Holy', 'Crystalline', 'Impressive', 'Cute', 'Kawaii', 'Celestial', 'Chibi',
'Anime', 'Manga', 'Live-action', 'Japanese', 'Western', 'Eastern', 'Zombified', 'Immortal',
import random
import re
#@title Prompt Settings
adjective = [
'Fierce', 'Scary', 'Interesting', 'Novel', 'Furry', 'Long-haired', 'Short-haired',
'Electric', 'Plasma', 'Humanoid', 'Insectoid', 'Alien', 'Tundra', 'Siberian', 'Ancient',
'Gigantic', 'Tiny', 'Small', 'Large', 'Oversized', 'Wild'
]
#!/usr/bin/ruby
require 'cinch'
require 'net/http'
require 'uri'
bot = Cinch::Bot.new do
configure do |c|
c.nick = "TK"
c.realname = "TK"
require 'ruby2d'
BUILD = :DEVELOPMENT
set title: 'Tiamat',
background: 'blue',
width: 640, viewport_width: 640,
height: 480, viewport_height: 480,
resizable: false,
borderless: BUILD == :PRODUCTION,
fullscreen: BUILD == :PRODUCTION,