View hoverboard_controller.cs
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? |
View stack.cs
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) |
View novelgens-promptgen-mar-24.py
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', |
View old-prompts-gen.py
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' | |
] |
View tk.rb
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" |
View tiamat.rb
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, |
View perflog.rb
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 'pry' | |
# APPROACH 1 | |
module PerfLogger | |
def perflog(func_name) | |
new_name_for_old_function = "#{func_name}_old".to_sym | |
alias_method(new_name_for_old_function, func_name) | |
define_method(func_name) do |*args| | |
puts "about to call #{func_name}(#{args.join(', ')})" |
View perflog.rb
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 'pry' | |
# APPROACH 1 | |
module PerfLogger | |
def perflog(func_name) | |
new_name_for_old_function = "#{func_name}_old".to_sym | |
alias_method(new_name_for_old_function, func_name) | |
define_method(func_name) do |*args| | |
puts "about to call #{func_name}(#{args.join(', ')})" |
View mutate.rb
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
def function_snapshot_from_passing_tests(n) | |
return n if (0..1).include?(n) | |
(function_snapshot_from_passing_tests(n - 1) + function_snapshot_from_passing_tests(n - 2)) | |
end | |
def regressed_function(n) | |
return n if (0...1).include?(n) | |
(regressed_function(n - 1) + regressed_function(n - 2)) |
View sql.rb
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
# { | |
# characters: [...], | |
# locations: [...] | |
# } | |
def content( | |
content_types: Rails.application.config.content_types[:all].map(&:name), | |
page_scoping: { user_id: self.id }, | |
universe_id: nil | |
) | |
return {} if content_types.empty? |
NewerOlder