This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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| |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void Start() | |
{ | |
StartCoroutine(Script()); | |
} | |
private void Update() | |
{ | |
if (waitingForClick && (Input.GetMouseButtonDown(0) || Input.GetKeyDown(KeyCode.Space))) | |
waitingForClick = false; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class CardColumnManager : MonoBehaviour | |
{ | |
public Stack<GameObject> card_stack; | |
void Start() | |
{ | |
card_stack = new Stack<GameObject>(); | |
} | |
public void AddCard(GameObject card) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' | |
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/ruby | |
require 'cinch' | |
require 'net/http' | |
require 'uri' | |
bot = Cinch::Bot.new do | |
configure do |c| | |
c.nick = "TK" | |
c.realname = "TK" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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, |
NewerOlder