Skip to content

Instantly share code, notes, and snippets.

View udaykadaboina's full-sized avatar
🎯
Focusing

Uday Kadaboina udaykadaboina

🎯
Focusing
View GitHub Profile
@udaykadaboina
udaykadaboina / byebug_commands.md
Created January 18, 2024 16:39 — forked from elrayle/byebug_commands.md
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)
@udaykadaboina
udaykadaboina / byebug_commands.md
Created January 18, 2024 16:39 — forked from elrayle/byebug_commands.md
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)
@udaykadaboina
udaykadaboina / delete_git_submodule.md
Created June 7, 2023 03:32 — forked from myusuf3/delete_git_submodule.md
How effectively delete a git submodule.

To remove a submodule you need to:

  • Delete the relevant section from the .gitmodules file.
  • Stage the .gitmodules changes git add .gitmodules
  • Delete the relevant section from .git/config.
  • Run git rm --cached path_to_submodule (no trailing slash).
  • Run rm -rf .git/modules/path_to_submodule (no trailing slash).
  • Commit git commit -m "Removed submodule "
  • Delete the now untracked submodule files rm -rf path_to_submodule
@udaykadaboina
udaykadaboina / gist:8268cdb8d5f753181c14862ff5fa482c
Created May 16, 2022 19:04 — forked from bkimble/gist:1365005
List local memcached keys using Ruby
#!/usr/bin/env ruby
# List all keys stored in memcache.
# Credit to Graham King at http://www.darkcoding.net/software/memcached-list-all-keys/ for the original article on how to get the data from memcache in the first place.
require 'net/telnet'
headings = %w(id expires bytes cache_key)
rows = []
@udaykadaboina
udaykadaboina / Gemfile
Created June 26, 2020 14:55 — forked from dhh/Gemfile
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
@udaykadaboina
udaykadaboina / git_submodules.md
Created March 23, 2019 05:43 — forked from gitaarik/git_submodules.md
Git Submodules basic explanation

Git Submodules basic explanation

Why submodules?

In Git you can add a submodule to a repository. This is basically a repository embedded in your main repository. This can be very useful. A couple of advantages of using submodules:

  • You can separate the code into different repositories.
@udaykadaboina
udaykadaboina / gist:201e6350887993094400356229fc2ae1
Created June 13, 2018 21:23 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@udaykadaboina
udaykadaboina / Default (OSX).sublime-keymap
Created November 10, 2017 17:16
Keybindings for Sublime Text
[
{ "keys": ["alt+g"], "command": "goto_definition" },
// Refresh folder list with F5
{ "keys": ["alt+f"], "command": "refresh_folder_list" },
{ "keys": ["alt+d"], "command": "run_macro_file", "args": {"file": "Packages/User/rspec-describe.sublime-macro"} },
{ "keys": ["alt+l"], "command": "run_macro_file", "args": {"file": "Packages/User/rspec-let.sublime-macro"} },
{ "keys": ["alt+i"], "command": "run_macro_file", "args": {"file": "Packages/User/rspec-it.sublime-macro"} },
]
@udaykadaboina
udaykadaboina / rspec-describe.sublime-macro
Created November 10, 2017 17:13
Macro for "describe" in Sublime Text
[
{
"args": null,
"command": "reindent"
},
{
"args":
{
"characters": "describe"
},
@udaykadaboina
udaykadaboina / base_controller.rb
Created March 2, 2017 23:34 — forked from dhoelzgen/base_controller.rb
CORS in Rails 4 APIs
class API::V1::BaseController < ApplicationController
skip_before_filter :verify_authenticity_token
before_filter :cors_preflight_check
after_filter :cors_set_access_control_headers
def cors_set_access_control_headers
headers['Access-Control-Allow-Origin'] = '*'
headers['Access-Control-Allow-Methods'] = 'POST, GET, PUT, DELETE, OPTIONS'