Skip to content

Instantly share code, notes, and snippets.

View Mikeysax's full-sized avatar

Michael Farrell Mikeysax

View GitHub Profile
@Mikeysax
Mikeysax / animation_player_interpolation.gd
Last active October 22, 2023 23:44
Automates the setting of interpolation mode on AnimationPlayer tracks in Godot 4.2+
extends AnimationPlayer
# HOW TO USE:
# Add this to an AnimationPlayer
# Make sure to set the interp mode on the node in the editor.
#
# Make sure to also set the FPS on the animation import as well.
# If you want to animate on 2s then set the fps to 12 or 15 and
# set Interp Mode to NEAREST
@Mikeysax
Mikeysax / Editor.tres
Created October 17, 2023 18:51 — forked from passivestar/Editor.tres
Godot editor theme
[gd_resource type="Theme" load_steps=10 format=3 uid="uid://baux6bqje2p6j"]
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_6h42l"]
content_margin_left = 10.5
content_margin_top = 8.75
content_margin_right = 10.5
content_margin_bottom = 8.75
bg_color = Color(0.116078, 0.116078, 0.116078, 1)
draw_center = false
border_width_left = 4
@Mikeysax
Mikeysax / settings.json
Last active October 6, 2023 21:59
VSCode editor.tokenColorCustomizations and workbench.colorCustomizations settings.json GDScript token override (Use with Dark Modern VSCode Theme)
"editor.tokenColorCustomizations": {
"textMateRules": [
{
"scope": [
"comment",
"punctuation.definition.comment"
],
"settings": {
"foreground": "#546E7A"
}
@Mikeysax
Mikeysax / hexToGodotVec4ShaderUniform.js
Last active August 13, 2022 18:17
Hex colors to Godot Vec4 Uniforms
// Uses Apollo Color Pallete By Default: https://lospec.com/palette-list/apollo
var hexColors = [
'#172038',
'#253a5e',
'#3c5e8b',
'#4f8fba',
'#73bed3',
'#a4dddb',
'#19332d',
'#25562e',
Back-end Technical Assignment
Build a link shortener API using Ruby on Rails.
Definition: An API that can accept URLs and return shorter URLs that when used, redirect to the actual URL.
User Stories (Get as many done as possible):
As a user, I want to be able to create a new shortened link where I provide a url and it is shortened
Front End Technical Assignment:
Build a Todo or Trello (kanban) clone using any frontend javascript framework of your choice.
Example: www.trello.com
Definition: A todo or kanban app allows a user to add ideas or tasks to a list or series of lists to keep track of said ideas or tasks.
User Stories (Get as many done as possible):
Front End Technical Assignment:
Build a Todo or Trello (kanban) clone using any frontend javascript framework of your choice.
Example: www.trello.com
Definition: A todo or kanban app allows a user to add ideas or tasks to a list or series of lists to keep track of said ideas or tasks.
User Stories (Get as many done as possible):
@Mikeysax
Mikeysax / keychron_linux.md
Created September 18, 2021 09:14 — forked from andrebrait/keychron_linux.md
Keychron keyboards on Linux (+ Bluetooth fixes)

Here is the best setup (I think so :D) for Keychron + Linux

Make Fn + F-keys work

Keychron Keyboards on Linux use the hid_apple driver (even in Windows/Android mode), both in Bluetooth and Wired modes. By default, this driver uses the F-keys as multimedia shortcuts and you have to press Fn + the key to get the usual F1 through F12 keys.

In order to change this, you need to change the fnmode parameter for the hid_apple kernel module. Here's some documentation on it, but a quick summary can be found below:

@Mikeysax
Mikeysax / find_values.rb
Last active June 17, 2021 14:58
Find Values
# Find all VAL instances that are directly after and instance of XX
# if a VAL has a VAL inbetween itself and XX, it does not meet the above criteria
# A VAL instance can have characters in between XX and VAL but not another XX or VAL
str = """Lorem ipsum dolor sit amet, consec[VAL1]tetur adipiscing elit. XX et sapien eu risus pretium mollis.
Fusce diam lacus, ornare quis dapibus in, porttitor non risus. Curabitur eleifend libero et XX venenatis.
Donec malesuada lobortis ex, eget cursus[VAL2] lectus interdum a. [VAL43]Aliquam iaculis magna nec rXXisus dapibus lobortis.
Aliquam aliquam magna et fringilla tincidunt. Proin urna risus, lacinia eu quam in, venenatis aliquet magna.
Mauris at ex id justo lacinia maximus id id mauris. Phasellus at dolor convallis, pellentesque leo maximus, vulputate diam.
In hac habitasse platea dictumst. Nullam feugiat venenatis congue. Suspendisse vestibulum ornare pretium.
// Write a function called `myMap` that accepts one argument and a callback.
// The argument is either a Object or an Array.
//
// When the argument is an Array, it applies the callback to each element of the Array
// and returns a new Array.
//
// When the argument is a Object, it applies the callback to each key/value pair of the Object.
// expects a Object and returns a new Object.
//
// Implement this behavior without using Array.map or related methods, such as reduce or filter, which return new Arrays