Skip to content

Instantly share code, notes, and snippets.

View ChechoCZ's full-sized avatar
🎯
Focusing

Sergio Cuadros ChechoCZ

🎯
Focusing
View GitHub Profile
@ChechoCZ
ChechoCZ / gist:3913b91e787a1b325f745e841c1a07a8
Last active February 11, 2020 15:00
Remove directory from repository added to .gitignore
git rm -r --cached directory_name
git commit -m 'Remove the now ignored directory directory_name'
git push origin master
sudo chown -R $(whoami) ~/.npm
@ChechoCZ
ChechoCZ / publickey-git-error.markdown
Created February 26, 2020 18:45 — forked from adamjohnson/publickey-git-error.markdown
Fix "Permission denied (publickey)" error when pushing with Git

"Help, I keep getting a 'Permission Denied (publickey)' error when I push!"

This means, on your local machine, you haven't made any SSH keys. Not to worry. Here's how to fix:

  1. Open git bash (Use the Windows search. To find it, type "git bash") or the Mac Terminal. Pro Tip: You can use any *nix based command prompt (but not the default Windows Command Prompt!)
  2. Type cd ~/.ssh. This will take you to the root directory for Git (Likely C:\Users\[YOUR-USER-NAME]\.ssh\ on Windows)
  3. Within the .ssh folder, there should be these two files: id_rsa and id_rsa.pub. These are the files that tell your computer how to communicate with GitHub, BitBucket, or any other Git based service. Type ls to see a directory listing. If those two files don't show up, proceed to the next step. NOTE: Your SSH keys must be named id_rsa and id_rsa.pub in order for Git, GitHub, and BitBucket to recognize them by default.
  4. To create the SSH keys, type ssh-keygen -t rsa -C "[email protected]". Th
const { resolve } = require('path');
module.exports = {
config: resolve(__dirname, 'src', 'config', 'database.js'),
'models-path': resolve(__dirname, 'src', 'database', 'models'),
'migrations-path': resolve(__dirname, 'src', 'database', 'migrations'),
'seeders-path': resolve(__dirname, 'src', 'database', 'seeders'),
};
{
"recommendations": [
"aaron-bond.better-comments",
"CoenraadS.bracket-pair-colorizer",
"naumovs.color-highlight",
"ms-azuretools.vscode-docker",
"EditorConfig.EditorConfig",
"dbaeumer.vscode-eslint",
"eamodio.gitlens",
"sidthesloth.html5-boilerplate",
require('dotenv').config();
module.exports = {
dialect: 'postgres',
host: process.env.DB_HOST,
username: process.env.DB_USER,
password: process.env.DB_PASS,
database: process.env.DB_NAME,
define: {
timestamps: true,
FROM node:latest
COPY . /src
WORKDIR /src
RUN npm install
EXPOSE 3000
version: '3'
services:
mongo:
image: mongo
ports:
- 27017:27017
compras:
build: ./compras
ports:
- 3000:3000
// List processes
sudo lsof -i :3000
// Kill process
kill -9 {PID}
@ChechoCZ
ChechoCZ / gist:2e0288228b6dd711deae679740acb2a4
Created June 13, 2020 20:50
Android Phone/Simulator Req Localhost
// Run in terminal the following command to allow android emulator or physical device to connect to localhost
adb reverse tcp:3000 tcp:3000
// Port should be backend port.