Skip to content

Instantly share code, notes, and snippets.

View budmc29's full-sized avatar

Teodor (Mugurel) Chirica budmc29

View GitHub Profile
@budmc29
budmc29 / prepare-commit-msg
Last active January 16, 2024 14:50
Power Rangers github script
#!/bin/bash
function prompt_for_multiselect {
# little helpers for terminal print control and key input
GREEN='\033[00;32m'
YELLOW='\033[00;33m'
RESTORE='\033[0m'
ESC=$( printf "\033")
cursor_blink_on() { printf "$ESC[?25h"; }
@budmc29
budmc29 / bottles.rb
Last active January 6, 2019 15:19
99 bootles of beer exercise
# 30 minute limit to implement the 99 bottle exercise
# Finished in 25 minutes, spent 5 minutes on light refactoring
#
class Bottles
def verse(number)
first_verse(number) + second_verse(number)
end
def verses(biggest_bottle, smallest_bottle)
biggest_bottle.downto(smallest_bottle).each do |number|
@budmc29
budmc29 / README.md
Created October 23, 2017 21:57 — forked from hofmannsven/README.md
My simply MySQL Command Line Cheatsheet

Ruby Association Certified Ruby Examination Silver Sample Questions

Q1. Which of the following have true values in Ruby? (Choose two.)

  • (a) ""
  • (b) 0
  • (c) false
  • (d) nil

@budmc29
budmc29 / tmux-cheatsheet.markdown
Created December 27, 2015 23:02 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@budmc29
budmc29 / vim-commands.txt
Last active September 30, 2015 14:16
Vim commands
dd -> delete line
D -> delete line content
p -> paste after cursor
P -> paste before cursor
@budmc29
budmc29 / capybara cheat sheet
Last active September 18, 2015 13:29 — forked from zhengjia/capybara cheat sheet
capybara cheat sheet
=Navigating=
visit('/projects')
visit(post_comments_path(post))
=Clicking links and buttons=
click_link('id-of-link')
click_link('Link Text')
click_button('Save')
click('Link Text') # Click either a link or a button
click('Button Value')