sudo apt install zsh-autosuggestions zsh-syntax-highlighting zsh
| #/bin/bash | |
| git config --global alias.pushall '!git remote | xargs -L1 git push --all' |
| #!/usr/bin/env bash | |
| git branch -r | grep -v '\->' | while read remote; do git branch --track "${remote#origin/}" "$remote"; done | |
| git fetch --all | |
| git pull --all |
| namespace :deploy do | |
| desc "reload the database with seed data" | |
| task :seed do | |
| on roles(:all) do | |
| within current_path do | |
| execute :bundle, :exec, 'rails', 'db:seed', 'RAILS_ENV=production' | |
| end | |
| end | |
| end | |
| end |
The connection failed because by default psql connects over UNIX sockets using peer authentication, that requires the current UNIX user to have the same user name as psql. So you will have to create the UNIX user postgres and then login as postgres or use sudo -u postgres psql database-name for accessing the database (and psql should not ask for a password).
If you cannot or do not want to create the UNIX user, like if you just want to connect to your database for ad hoc queries, forcing a socket connection using psql --host=localhost --dbname=database-name --username=postgres (as pointed out by @meyerson answer) will solve your immediate problem.
But if you intend to force password authentication over Unix sockets instead of the peer method, try changing the following pg_hba.conf* line:
from
| # http://webapps.stackexchange.com/questions/39587/view-estimated-size-of-github-repository-before-cloning | |
| # tested on macOS | |
| echo https://github.com/torvalds/linux.git | perl -ne 'print $1 if m!([^/]+/[^/]+?)(?:\.git)?$!' | xargs -I{} curl -s -k https://api.github.com/repos/'{}' | grep size | |
| # output: | |
| # "size": 1746294, |
Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.
| //Import Statements | |
| public class ActivityName extends AppCompatActivity { | |
| private RecyclerView mRecyclerView; | |
| private RecyclerView.Adapter mAdapter; | |
| private RecyclerView.LayoutManager mLayoutManager; | |
| @Override | |
| protected void onCreate(Bundle savedInstanceState) { | |
| super.onCreate(savedInstanceState); |
How to have some fun using the terminal.
sudo apt-get install cowsaysudo apt-get install fortunesudo apt-get install figletruby -vgem install lolcat