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:b344c62883226ba93356360a71f6440d
Created July 13, 2020 19:11
FFMPEG command to create chunks
ffmpeg -i "https://test-streams.mux.dev/x36xhzz/x36xhzz.m3u8" -filter_complex "[0:v:2]trim=0:2,setpts=PTS-STARTPTS[v0]; [0:a:2]atrim=0:2,asetpts=PTS-STARTPTS[a0]; [0:v:2]trim=4:6,setpts=PTS-STARTPTS[v1]; [0:a:2]atrim=4:6,asetpts=PTS-STARTPTS[a1]; [0:v:2]trim=8:10,setpts=PTS-STARTPTS[v2]; [0:a:2]atrim=8:10,asetpts=PTS-STARTPTS[a2]; [v0][v1][v2] concat=n=3:v=1:a=0 [outv]; [a0][a1][a2] concat=n=3:v=0:a=1[outa]" -map "[outv]" -map "[outa]" output.mp4
@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.
// List processes
sudo lsof -i :3000
// Kill process
kill -9 {PID}
version: '3'
services:
mongo:
image: mongo
ports:
- 27017:27017
compras:
build: ./compras
ports:
- 3000:3000
FROM node:latest
COPY . /src
WORKDIR /src
RUN npm install
EXPOSE 3000
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,
{
"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",
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'),
};
@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
sudo chown -R $(whoami) ~/.npm