Skip to content

Instantly share code, notes, and snippets.

@andiskiy
andiskiy / git_remove_old_branches.rb
Created April 26, 2022 14:30 — forked from bacrossland/git_remove_old_branches.rb
Ruby script for removing old local and remote git branches
#!/usr/bin/ruby
branches = `git branch --list `
branches.gsub!('\n')
branches_arr = branches.split
# Removing from the branches_arr the branches you want to keep.
# Add or remove branches from here based on your need.
branches_arr.delete('*')
@andiskiy
andiskiy / Rails Singleton Model
Created November 18, 2019 12:45 — forked from thejbsmith/Rails Singleton Model
Rails Singleton Model
Rails Singleton Model
Taken from:
http://stackoverflow.com/questions/399447/how-to-implement-a-singleton-model/12463209#12463209