Skip to content

Instantly share code, notes, and snippets.

View romkaspb's full-sized avatar

Roman Novoselov romkaspb

View GitHub Profile
@Envek
Envek / true_money.rb
Last active June 23, 2022 13:43
Example of “true money” PostgreSQL composite type including both amoiunt and currency and how to work with it in Ruby on Rails
# Example of custom PostgreSQL composite type support
# Works with Rails 6.0, also should work with Rails 5.2
# Place this file to config/initializers/
gem "money"
require "money"
# Subclass Money class just to get pretty output in rails console
class TrueMoney < Money
def inspect
# migrating from https://github.com/robbyrussell/oh-my-zsh/blob/master/plugins/git/git.plugin.zsh
# Aliases
alias g='git'
#compdef g=git
alias gst='git status'
#compdef _git gst=git-status
alias gd='git diff'
#compdef _git gd=git-diff
alias gdc='git diff --cached'
@Saicheg
Saicheg / screenshare
Created December 7, 2012 07:46
Share screenshots on Ubuntu using Dropbox
#!/bin/bash
################
# Description:
# This script will take screenshot of your desktop
# or only active window ( running with -u param ),
# copy it to /Dropbox/Public/share/ with uniq name
# and save path to clipboard
#################
# Requirements:
# Dropbox