Example:
array_of_hashes = [
{:a=>1}, {:a=>2}, {:a=>3},
{:b=>4}, {:b=>5}, {:b=>6}, {:b=>7}, {:b=>8}, {:b=>9},
{:c=>10}
]
Solution 1:
Example:
array_of_hashes = [
{:a=>1}, {:a=>2}, {:a=>3},
{:b=>4}, {:b=>5}, {:b=>6}, {:b=>7}, {:b=>8}, {:b=>9},
{:c=>10}
]
Solution 1:
cd ~ | |
touch .bashrc | |
vim .bashrc | |
alias subl="/c/Program\ Files/Sublime\ Text\ 3/sublime_text.exe" | |
save and exit | |
source .bashrc | |
position in project folder | |
subl . |
# Basic key operators to query the JSON objects : | |
# #> : Get the JSON object at that path (if you need to do something fancy) | |
# -> : Get the JSON object at that path (if you don't) | |
# ->> : Get the JSON object at that path as text | |
# {obj, n} : Get the nth item in that object | |
# https://www.postgresql.org/docs/9.4/functions-json.html#FUNCTIONS-JSONB-OP-TABLE | |
# Date | |
# date before today |
{ | |
"folder_exclude_patterns": | |
[ | |
"public" | |
], | |
"font_size": 12, | |
"ignored_packages": | |
[ | |
"Vintage" | |
], |
{ | |
// Would you prefer a tab or two spaces to represent a tab | |
// The default is two spaces represented by 'space' | |
// anything else will use one tab character | |
"file_patterns": ["\\.html\\.erb", "\\.rb", "\\.rake", "Rakefile", "Gemfile", "Vagrantfile"], | |
"html_erb_patterns": ["\\.html\\.erb"], | |
"run_on_save": false, | |
"save_on_beautify": true, | |
"ruby": "c:\\jruby-9.1.17.0\\bin\\jruby" | |
} |
[color] | |
ui = true | |
[alias] | |
co = checkout | |
ci = commit | |
st = status | |
br = branch | |
di = diff | |
lg = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit | |
[difftool "kdiff3"] |
$ pg_dump -h <public dns> -U <my username> -f <name of dump file .sql> <name of my database>
$ psql -U <postgresql username> -d <database name> -f <dump file that you want to restore>