Skip to content

Instantly share code, notes, and snippets.

View sgobotta's full-sized avatar
:octocat:
(🎧) => ╭( 👁️◡👁️ )/

Santiago Botta sgobotta

:octocat:
(🎧) => ╭( 👁️◡👁️ )/
View GitHub Profile
#!/usr/bin/env python
import requests
URL = 'https://www.dolarsi.com/api/api.php?type=valoresprincipales'
json = requests.get(URL).json()
print()
print(' 💵 | compra | venta')
print('----|--------|-------')
@sgobotta
sgobotta / README.md
Created May 26, 2021 23:08
Just an asdf cheatsheet

Asdf cheatsheet

Tool Installation

Clone the repository

git clone https://github.com/asdf-vm/asdf.git ~/.asdf
cd ~/.asdf
git checkout "$(git describe --abbrev=0 --tags)"
@sgobotta
sgobotta / README.md
Last active April 26, 2021 14:08
My oh-my-zsh theme

sgobotta's Zsh Theme

Pre-requisites

Usage

  • Copy the sgobotta.zsh-theme file in a custom/themes directory in the ~/.oh-my-zsh repository
  • Paste this line in the very beginning of your ~/.zshrc file: ZSH_THEME=sgobotta
@sgobotta
sgobotta / README.md
Last active April 8, 2021 19:31
Checkout branches

Checkout branch util

Install

Go to the directory you want to store the script and paste the followinf code. It will download the script and create an alias in your shell init script.

  • Bash users should use .bashrc
  • Zsh users should use .zshrc
@sgobotta
sgobotta / copy-fonts.sh
Last active March 31, 2021 20:02
Simple script to copy fonts into Ubuntu's default fonts directory
#!/usr/bin/bash
FOLDER_NAME=$1
FONTS_DIR=$2
DEFAULT_FONTS_DIR=~/.local/share/fonts
if [[ -z "$FOLDER_NAME" ]]; then
echo "Empty fonts source directory provided. Usage: copy-font.sh <folder-name>"
exit 1
fi
@sgobotta
sgobotta / xfce-touchpad-toggle.sh
Last active November 2, 2020 21:06
Simple touchpad toggle for xfce environments
#!/usr/bin/bash
# Configuration
#
# Press the super key => Keyboard => Shortcuts
#
# Use the next command, followed by your device name
#
# -- Zsh command line
#
@sgobotta
sgobotta / adb-cheatsheet.md
Last active March 31, 2021 20:03
Android Debugging Bridge (adb) Cheatsheet (Spanish)

Android Debugging Bridge

Se utiliza adb desde la línea de comandos para poder establecer una conexión con el dispositivo móvil.

Luego de instalarlo podemos optar por conectarnos con el dispoitivo móvil mediante un cable usb o mediante Wi-Fi. A continuación una descripción de comandos y ambas opciones de conexión.

Es condición necesaria habilitar las opciones de desarrollo en la sección Sistema del dispositivo móvil, en particular habilitar la opción de depuración por USB (USB debugging).

devices

@sgobotta
sgobotta / server.erl
Last active June 25, 2020 07:56
Gist for the FeatureLearn Concurrent Programming In Erlang course (1.5) "Exercise: Trying it for yourself"
-module(server).
-author("Santiago Botta <santiago@camba.coop>").
-include_lib("eunit/include/eunit.hrl").
-export([server/0, server/1, proxy/1]).
-export([start/1, check/2, stop/1]).
% Testing purpose
-export([send_multiple_requests/3]).
%%%-------------------------------------------------------------------
%% @doc Server tests
@sgobotta
sgobotta / rps.erl
Last active August 5, 2020 20:30
Gist for the FeatureLearn Erlang course (4.12) "Strategies exercises"
-module(rps).
-author("Santiago Botta <santiago@camba.coop>").
-include_lib("eunit/include/eunit.hrl").
-export([
play/1, play_two/3, val/1,tournament/2,const/2,enum/1,get_strategies/0,
no_repeat/1,rock/1,cycle/1,rand/1,echo/1,least_frequent/1,most_frequent/1,
random_strategy/1, best_scored/1,
main_test_game/0
]).
-import(utils, [least_frequents/1,most_frequents/1,take/2]).
@sgobotta
sgobotta / hof.erl
Last active May 28, 2020 16:05
Gist for the FeatureLearn Erlang course (4.5) "Higher-order functions in practice"
-module(hof).
-author("@sgobotta").
-include_lib("eunit/include/eunit.hrl").
-export([doubleAll/1, evens/1, product/1]).
-export([zip/2, zip_using_hof/2]).
-export([zip_with/3, zip_with_using_hof/3]).
%% Define the functions doubleAll, evens, and product using the higher-order
%% functions lists:map, lists:filter and lists:foldr.
%%