Skip to content

Instantly share code, notes, and snippets.

View ByteDecoder's full-sized avatar
🏠
Working from home

Rodrigo Reyes ByteDecoder

🏠
Working from home
View GitHub Profile
/*
* Legacy Particle System Updater
* A tool that can be used to convert Legacy Particle Systems into new Particle System Components.
* https://forum.unity.com/threads/release-legacy-particle-system-updater.510879/
*
* v1.0
* Initial release
*
* v1.1
* Fixed incorrect billboard mode
@ByteDecoder
ByteDecoder / ripple.shader
Created November 29, 2024 02:38 — forked from gkaizer1/ripple.shader
Unity example of ripple effect
Shader "Unlit/ripple_shader"
{
Properties
{
_MainTex ("Texture", 2D) = "white" {}
_amount ("_amount", Range(0.01, 1.0)) = 0.5
_spread ("_spread", Range(0.01, 1.0)) = 0.5
_width ("_width", Range(0.01, 1.0)) = 0.5
_alpha ("_alpha", Range(0.01, 1.0)) = 0.5
@ByteDecoder
ByteDecoder / SMBDIS.ASM
Created September 8, 2023 17:48 — forked from 1wErt3r/SMBDIS.ASM
A Comprehensive Super Mario Bros. Disassembly
;SMBDIS.ASM - A COMPREHENSIVE SUPER MARIO BROS. DISASSEMBLY
;by doppelganger ([email protected])
;This file is provided for your own use as-is. It will require the character rom data
;and an iNES file header to get it to work.
;There are so many people I have to thank for this, that taking all the credit for
;myself would be an unforgivable act of arrogance. Without their help this would
;probably not be possible. So I thank all the peeps in the nesdev scene whose insight into
;the 6502 and the NES helped me learn how it works (you guys know who you are, there's no
@ByteDecoder
ByteDecoder / sidekiq.service
Created April 1, 2023 02:24 — forked from sj26/sidekiq.service
systemd unit files for multiple sidekiq workers
[Unit]
Description=Sidekiq workers
# start as many workers as you want here
[email protected]
[email protected]
# ...
[Service]
Type=oneshot
ExecStart=/bin/true
@ByteDecoder
ByteDecoder / [email protected]
Created March 30, 2023 21:45 — forked from Loriowar/[email protected]
Systemd unit for multiprocess sidekiq. Based on example unit from official sidekiq page on GitHub.
# https://github.com/mperham/sidekiq/blob/master/examples/systemd/sidekiq.service
#
# systemd unit file for CentOS 7, Ubuntu 15.04
#
# Customize this file based on your bundler location, app directory, etc.
# Put this in /usr/lib/systemd/system (CentOS) or /lib/systemd/system (Ubuntu).
# Run:
# - systemctl enable sidekiq
# - systemctl {start,stop,restart} sidekiq
#
@ByteDecoder
ByteDecoder / rspec_model_testing_template.rb
Created April 16, 2022 21:22 — forked from PWSdelta/rspec_model_testing_template.rb
Rails Rspec model testing skeleton & cheat sheet using rspec-rails, shoulda-matchers, shoulda-callbacks, and factory_girl_rails. Pretty much a brain dump of examples of what you can (should?) test in a model. Pick & choose what you like, and please let me know if there are any errors or new/changed features out there. Reddit comment thread: http…
# This is a skeleton for testing models including examples of validations, callbacks,
# scopes, instance & class methods, associations, and more.
# Pick and choose what you want, as all models don't NEED to be tested at this depth.
#
# I'm always eager to hear new tips & suggestions as I'm still new to testing,
# so if you have any, please share!
#
# @kyletcarlson
#
# This skeleton also assumes you're using the following gems:
@ByteDecoder
ByteDecoder / ghost_methods.md
Created March 29, 2022 17:47 — forked from theprogramsam/ghost_methods.md
ruby 'ghost' methods

Ruby 'Ghost' Methods

Ghosts are spooooky!

But really this is just a goofy name for one of many options of dynamically creating methods in ruby which is part of that fancy business known as Metaprogramming. Which is a fancy name for the concept of writing code that 'writes' code. It's bananas and great and the best thing you will ever see in your career also it is terrible, horrible, no good and the worst thing you will ever see in your career. We are just going to go over what has been dubbed 'ghost' methods by someone who likes to have cool names for things, there is a lot more to metaprogramming in general than just this technique but it is a pretty good entry point.

@ByteDecoder
ByteDecoder / MinimalAPIs.md
Created November 22, 2021 22:22 — forked from davidfowl/MinimalAPIs.md
Minimal APIs at a glance
@ByteDecoder
ByteDecoder / unity_assets_relocation.md
Last active November 1, 2021 02:40
Move unity assets to another hard drive with more space instead of the OS hard drive default installation (Windows)

Steps:

1.- Create the destination directory in the desired drive with space, a lot of GB space

2.- Then copy all the content from %USERPROFILE%\AppData\Roaming\Unity into this new directory

3.- Delete the entire directory %USERPROFILE%\AppData\Roaming\Unity

4.- As and admin execute the command prompt and type:

@ByteDecoder
ByteDecoder / MyDB.cs
Created July 1, 2021 01:24 — forked from albertbori/MyDB.cs
.NET EntityFramework Encryption Example (C#)
public class MyDB : IdentityDbContext<User>
{
//DBSet properties go here
public MyDB()
{
((IObjectContextAdapter)this).ObjectContext.ObjectMaterialized += new ObjectMaterializedEventHandler(ObjectMaterialized);
}
#region Encryption