Skip to content

Instantly share code, notes, and snippets.

View udaykadaboina's full-sized avatar
🎯
Focusing

Uday Kadaboina udaykadaboina

🎯
Focusing
View GitHub Profile
@MiroslavCsonka
MiroslavCsonka / terminal.sh
Last active October 5, 2025 14:09
Github Action with `gh signoff`
git add xyz.rb
git commit -m "A meaningful change"
# NOTE: The job has a 5-second waiting period since there's a delay between pushing and creating a new "signoff" GitHub check status.
git push && gh signoff
@dhh
dhh / Gemfile
Created June 24, 2020 22:23
HEY's Gemfile
ruby '2.7.1'
gem 'rails', github: 'rails/rails'
gem 'tzinfo-data', '>= 1.2016.7' # Don't rely on OSX/Linux timezone data
# Action Text
gem 'actiontext', github: 'basecamp/actiontext', ref: 'okra'
gem 'okra', github: 'basecamp/okra'
# Drivers
@donvito
donvito / main.go
Last active December 17, 2025 17:03
AES-256 encrypt/decrypt in Go
package main
import (
"crypto/aes"
"crypto/cipher"
"crypto/rand"
"encoding/hex"
"fmt"
"io"
)
@elrayle
elrayle / byebug_commands.md
Last active September 15, 2025 14:04
Byebug Cheatsheet - organized by related commands

Byebug Cheatsheet

This cheatsheet includes most of the byebug commands organized by related commands (e.g. breakpoint related commands are together).

To see official help...

Command Aliases Example Comments
help h h list top level of all commands
help cmd h cmd-alias h n list the details of a command (example shows requesting details for the next command) (this works for all commands)
@akshaymohite
akshaymohite / luhn-algorithm-to-validate-card-number.rb
Last active October 10, 2019 22:14
Luhn's Algorithm to validate card numbers
number = "314143525252"
sum = 0
number.reverse.split("").each_slice(2) do |x,y|
sum += x.to_i + (2*y.to_i).divmod(10).sum
end
p sum%10 == 0 ? 'valid card number' : 'invalid card number'
@schweigert
schweigert / Embedding GoLang into a Ruby application.md
Last active September 8, 2025 15:44
Embedding GoLang into a Ruby application - Blogpost to Magrathealabs

Go Title

I am passionate about Ruby, but its execution time compared to other languages is extremely high, especially when we want to use more complex algorithms. In general, data structures in interpreted languages become incredibly slow compared to compiled languages. Some algorithms such as ´n-body´ and ´fannkuch-redux´ can be up to 30 times slower in Ruby than Go. This is one of the reasons I was interested in embedding Go code in a Ruby environment.

For those who do not know how shared libraries operate, they work in a similar way as DLLs in Windows. However, they have a native code with a direct interface to the C compiler.

Note Windows uses the DLL system, and in this case, this does not necessarily have to be in native code.

One example is DLLs written in C#, which runs on a virtual machine. Because I do not use windows, I ended up not testing if it is poss

@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active January 13, 2026 13:10
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@ldez
ldez / gmail-github-filters.md
Last active October 10, 2025 09:53
Gmail and GitHub - Filters

Gmail and GitHub

How to filter emails from GitHub in Gmail and flag them with labels.

The labels in this document are just examples.

Pull Request

Filter Label
@ColCh
ColCh / README.md
Last active September 26, 2024 08:12
Git pre-push hook to confirm pushing to master