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
@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'
"""
LA DATA ES
{'events_list': [{'status': u'confirmed', 'final': datetime.datetime(2020, 8, 26, 0, 58, tzinfo=tzoffset(None, -18000)),
'recurrence': False, 'inicio': datetime.datetime(2020, 8, 25, 18, 6, tzinfo=tzoffset(None, -18000)),
'summary': u'Vuelo a Las Vegas (CM 456)', 'id': u'_6tlnaqrle5p6cpb4dhmj4phpego68rb6c9i7cdb6d1jmkshgclmj4obf6hq7cq9oe8rn0prg69mmcthicdmn4drcdln6irradgonap32coo6e'},
{'status': u'confirmed', 'final': datetime.datetime(2020, 9, 29, 15, 0, tzinfo=tzoffset(None, -18000)),
'recurrence': False, 'inicio': datetime.datetime(2020, 9, 29, 12, 22, tzinfo=tzoffset(None, -18000)), 'summary': u'Vuelo a La Habana (CM 246)',
'id': u'_6tlnaqrle5p6cpb4dhmj4phpegr6ud3b60rncs3fdpl6gpr5dorn4c1ledj36rpne0p7ctje61n30e3m6pk36cj5e5h6idrm65gj8sbbd9lj0'},
{'status': u'confirmed', 'final': datetime.datetime(2020, 9, 29, 10, 2, tzinfo=tzoffset(None, -18000)),
SDKROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk MACOSX_DEPLOYMENT_TARGET=10.14 pyenv install 3.7.3
autoload -Uz compinit
compinit
ZSH_THEME="powerlevel9k/powerlevel9k"
# Load Nerd Fonts with Powerlevel9k theme for Zsh
POWERLEVEL9K_MODE='nerdfont-complete'
source ~/powerlevel9k/powerlevel9k.zsh-theme
# Customise the Powerlevel9k prompts
POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(ssh dir vcs newline status)
POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=()
POWERLEVEL9K_PROMPT_ADD_NEWLINE=true