Skip to content

Instantly share code, notes, and snippets.

View edgarMejia's full-sized avatar
:octocat:
Valiending

Edgar Mejía edgarMejia

:octocat:
Valiending
View GitHub Profile
@edgarMejia
edgarMejia / instructions.md
Created March 27, 2024 22:20 — forked from DakotaLMartinez/instructions.md
Adding an SSH key to GitHub (Mac OS X or Linux)

You need to do this if you try this command:

ssh -T git@github.com

and you get something that says

git@github.com: Permission denied (public key).

Oh my zsh.

Install with curl

sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

Enabling Plugins (zsh-autosuggestions & zsh-syntax-highlighting)

  • Download zsh-autosuggestions by
@edgarMejia
edgarMejia / change_primary_key.md
Created January 4, 2019 22:12 — forked from scaryguy/change_primary_key.md
How to change PRIMARY KEY of an existing PostgreSQL table?
-- Firstly, remove PRIMARY KEY attribute of former PRIMARY KEY
ALTER TABLE <table_name> DROP CONSTRAINT <table_name>_pkey;
-- Then change column name of  your PRIMARY KEY and PRIMARY KEY candidates properly.
ALTER TABLE <table_name> RENAME COLUMN <primary_key_candidate> TO id;
@edgarMejia
edgarMejia / UpdateQuery.java
Created December 12, 2018 22:35 — forked from Hazem-Ben-Khalfallah/UpdateQuery.java
[Ebean raw update query] Execute raw sql update #sql #ebean
public static final String SQL_UPDATE = "update person set usr_name = :name ";
final Update update = Ebean.createUpdate(Person.class, SQL_UPDATE);
update.setParameter("name", "new name");
final int updatedRows = update.execute();