Skip to content

Instantly share code, notes, and snippets.

View lvidarte's full-sized avatar

Leo Vidarte lvidarte

View GitHub Profile
@lvidarte
lvidarte / main.py
Created July 22, 2024 04:25
Mini oscilloscope for ESP32 TTFO
"""
MINI OSCILLOSCOPE
Author: Leo Vidarte <https://minirobots.com.ar>
This is free software,
you can redistribute it and/or modify it
under the terms of the GPL version 3
as published by the Free Software Foundation.
@lvidarte
lvidarte / sketch.ino
Created December 25, 2014 22:57
Servo DS04-NFC 360° Continuous Rotation
#include <Servo.h>
#define SERVO_PIN 9
#define CW 1900
#define STOP 1450
#define CCW 1000
Servo myServo;
#!/usr/bin/python3
"""
Author: Leo Vidarte <http://nerdlabs.com.ar>
This is free software,
you can redistribute it and/or modify it
under the terms of the GPL version 3
as published by the Free Software Foundation.
@lvidarte
lvidarte / gist:1aeb2b58d874d19eed5e6fea6f0e7ed2
Created March 27, 2019 20:03
Build image inside minikube and then use it from there
# Start minikube
minikube start
# Set docker env
eval $(minikube docker-env)
# Build image
docker build -t foo:0.0.1 .
# Run in minikube
@lvidarte
lvidarte / test.ipynb
Created July 28, 2018 23:55
Test Jupyter Notecook
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
from selenium import webdriver
browser = webdriver.Chrome()
browser.get("https://www.imaginelearning.com")
e = browser.get_element_by<tab>
e = browser.find_element_by_css_selector("div.banner-content > div.content > div:nth-child(3)")
e.text
@lvidarte
lvidarte / postgres-cheatsheet.md
Created November 19, 2017 10:34 — forked from Kartones/postgres-cheatsheet.md
PostgreSQL command line cheatsheet

PSQL

Magic words:

psql -U postgres

Some interesting flags (to see all, use -h):

  • -E: will describe the underlaying queries of the \ commands (cool for learning!)
  • -l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)
@lvidarte
lvidarte / 11.py
Last active November 6, 2017 13:57
11, a 2048 clone made with Python and curses
#!/bin/python
"""
Author: Leo Vidarte <http://nerdlabs.com.ar>
This is free software,
you can redistribute it and/or modify it
under the terms of the GPL version 3
as published by the Free Software Foundation.
@lvidarte
lvidarte / linux_fun.md
Last active November 6, 2017 13:45 — forked from marianposaceanu/linux_fun.md
How to have some fun using the terminal.

Linux fun-o-matic

How to have some fun using the terminal.

  1. Install cowsay [0] via : sudo apt-get install cowsay
  2. Install fortune [1] via : sudo apt-get install fortune
  3. Make sure you have Ruby installed via : ruby -v
  4. Install the lolcat [2] via : gem gem install lolcat
  5. Profit!
package main
import (
"bufio"
"bytes"
"crypto/tls"
"encoding/hex"
"encoding/json"
"errors"
"io"