Skip to content

Instantly share code, notes, and snippets.

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

Yoandre Saavedra Gonzalez yoandresaav

🏠
Working from home
View GitHub Profile

-Parar o eliminar todos los contenedores docker:

Para pararlos puede usarse: docker stop $(docker ps -a -q)

Y para eliminarlos: docker rm $(docker ps -a -q)

@yoandresaav
yoandresaav / git.md
Last active December 8, 2022 21:10
GIT

commit el ultimo a partir del cual se hace rebase,

usar solo en local, antes de subir los archivos al repositorio

git rebase -i #commit

Eliminar todas las branch locales que han sido merged sin tocar master, main y dev

git branch --merged | egrep -v "(^*|master|main|dev)" | xargs git branch -d

@yoandresaav
yoandresaav / commands.md
Last active September 3, 2021 22:29
Commands-Listopto

analyse a bundle

$ node analyse.js

Analyse more deeply

$ source-map-explorer static/dist/bundle.js

@yoandresaav
yoandresaav / firebase-tricks
Last active October 24, 2021 19:57
Firebase Tricks
# Load emulators
firebase emulators:start --import=./saved-data --export-on-exit
# Acceder a functions
$ export GOOGLE_APPLICATION_CREDENTIALS="path/to/key.json"
$ firebase functions:shell
# kill pid
lsof -t -i tcp:5000 | xargs kill
lsof -ti tcp:9000 | xargs kill -9
import {
ToastAndroid,
Platform,
AlertIOS,
} from 'react-native';
function notifyMessage(msg: string) {
if (Platform.OS === 'android') {
ToastAndroid.show(msg, ToastAndroid.SHORT)
} else {
pragma solidity ^0.4.24;
// ----------------------------------------------------------------------------
// Sample token contract
//
// Symbol : {{Token Symbol}}
// Name : {{Token Name}}
// Total supply : {{Total Supply}}
// Decimals : {{Decimals}}
// Owner Account : {{Owner Account}}
const downloadCVs = async () => {
const url = window.django.urls.get_documens_cvs_for_have_company_whitout_member;
const response = await axios.get(url, {params: { applicant: applicant.id }, responseType: 'arraybuffer'});
let fileName = response.headers["content-disposition"].split("filename=")[1];
if (window.navigator && window.navigator.msSaveOrOpenBlob) { // IE variant
window.navigator.msSaveOrOpenBlob(new Blob([response.data], {type: 'application/zip'}),
fileName);
} else {
Buscar y reemplazar con regex el término ^\s*$\n
@yoandresaav
yoandresaav / .vimrc
Created October 18, 2020 23:44 — forked from miguelgrinberg/.vimrc
My .vimrc configuration for working in Python with vim
" plugins
let need_to_install_plugins = 0
if empty(glob('~/.vim/autoload/plug.vim'))
silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
let need_to_install_plugins = 1
endif
call plug#begin()
Plug 'tpope/vim-sensible'