Skip to content

Instantly share code, notes, and snippets.

View carloscarcamo's full-sized avatar
🏠
Working from home

Carlos Cárcamo carloscarcamo

🏠
Working from home
View GitHub Profile
@carloscarcamo
carloscarcamo / git_branch_naming.md
Created April 8, 2020 18:57 — forked from revett/git_branch_naming.md
Git Branch Naming Conventions

<type>/<name>

<type>

bug    - Code changes linked to a known issue.
feat   - New feature.
hotfix - Quick fixes to the codebase.
junk   - Experiments (will never be merged).
@carloscarcamo
carloscarcamo / RAILS_CHEATSHEET.md
Created March 25, 2020 14:55 — forked from mdang/RAILS_CHEATSHEET.md
Ruby on Rails Cheatsheet

Ruby on Rails Cheatsheet

Architecture

Create a new application

Install the Rails gem if you haven't done so before

#!/usr/bin/env bash
#
# Originally from https://gist.github.com/IanVaughan/2902499
#
# authors: Ian Vaughan
# Jacob Zimmerman
#
# usage: uninstall_gems [<version> ...]
#
# examples:
@carloscarcamo
carloscarcamo / rails http status codes
Created October 16, 2018 09:59 — forked from mlanett/rails http status codes
HTTP status code symbols for Rails
HTTP status code symbols for Rails
Thanks to Cody Fauser for this list of HTTP responce codes and their Ruby on Rails symbol mappings.
Status Code Symbol
1xx Informational
100 :continue
101 :switching_protocols
102 :processing
[
{
"currency": "Albania Lek",
"abbreviation": "ALL",
"symbol": "&#76;&#101;&#107;"
},
{
"currency": "Afghanistan Afghani",
"abbreviation": "AFN",
"symbol": "&#1547;"

Postgres Cheatsheet

This is a collection of the most common commands I run while administering Postgres databases. The variables shown between the open and closed tags, "<" and ">", should be replaced with a name you choose. Postgres has multiple shortcut functions, starting with a forward slash, "". Any SQL command that is not a shortcut, must end with a semicolon, ";". You can use the keyboard UP and DOWN keys to scroll the history of previous commands you've run.

Setup

installation, Ubuntu

http://www.postgresql.org/download/linux/ubuntu/ https://help.ubuntu.com/community/PostgreSQL

@carloscarcamo
carloscarcamo / postgres-cheatsheet.md
Created July 25, 2018 22:06 — forked from Kartones/postgres-cheatsheet.md
PostgreSQL command line cheatsheet

PSQL

Magic words:

psql -U postgres

Some interesting flags (to see all, use -h):

  • -E: will describe the underlaying queries of the \ commands (cool for learning!)
  • -l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)
@carloscarcamo
carloscarcamo / multiple_ssh_setting.md
Created June 11, 2018 07:27 — forked from jexchan/multiple_ssh_setting.md
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "your_email@youremail.com"
@carloscarcamo
carloscarcamo / MongoDB_macOS_Sierra.md
Created April 14, 2018 17:35 — forked from nrollr/MongoDB_macOS_Sierra.md
Install MongoDB on Sierra using Homebrew

Install MongoDB on macOS Sierra

This procedure explains how to install MongoDB using Homebrew on macOS Sierra 10.12.
Official MongoDB install documentation: here

Install Homebrew

  • Installing Homebrew is effortless, open Terminal and enter :
    $ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
@carloscarcamo
carloscarcamo / curl.md
Created March 15, 2018 22:03 — forked from subfuzion/curl.md
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.