Skip to content

Instantly share code, notes, and snippets.

:octocat:
Coding

Renan Borges renanborgez

:octocat:
Coding
Block or report user

Report or block renanborgez

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@renanborgez
renanborgez / docker-destroy-all.sh
Created Jan 18, 2019 — forked from JeffBelback/docker-destroy-all.sh
Destroy all Docker Containers and Images
View docker-destroy-all.sh
#!/bin/bash
# Stop all containers
docker stop $(docker ps -a -q)
# Delete all containers
docker rm $(docker ps -a -q)
# Delete all images
docker rmi $(docker images -q)
@renanborgez
renanborgez / clear-docker
Created Sep 4, 2019
remove dangling volumes of docker
View clear-docker
# Removing dangling volumes
docker volume rm $(docker volume ls -f dangling=true -q)
View launch.json
{
"name": "Jest via npm",
"type": "node",
"request": "launch",
"cwd": "${workspaceFolder}",
"runtimeExecutable": "npm",
"runtimeArgs": ["run-script", "debug:vscode"],
"port": 9229
}
View clear-local-branches.txt
## Delete local branches already merged
git fetch --prune && git branch --merged | egrep -v "(^\*|master|develop)" | xargs git branch -d
## Delete local branches
git fetch --prune && git branch | egrep -v "(^\*|master|develop)" | xargs git branch -d
@renanborgez
renanborgez / redux-saga-poll-loop.js
Created Nov 29, 2019 — forked from markerikson/redux-saga-poll-loop.js
Redux-Saga controllable long-polling loop
View redux-saga-poll-loop.js
import { take, put, call, fork, cancel, cancelled } from 'redux-saga/effects'
import {EVENT_POLLING_START, EVENT_POLLING_STOP} from "constants/eventPolls";
import {ClientEventType} from "constants/serverEvents";
function* handleEventA(serverEvent) {
yield put({type : serverEvent.type, payload : {name : serverEvent.eventAData}});
}
You can’t perform that action at this time.