Skip to content

Instantly share code, notes, and snippets.

View IoTeacher's full-sized avatar

René Solis IoTeacher

View GitHub Profile

📒 3.4.1 Ejercicios.

📊 Patrón Estrategia.

  • 👩‍💻 Nombre: Cortes Hernandez Yuridia Saray

📌 Objetivo:

Implementar el patrón Estrategia para permitir el cambio dinámico de los algoritmos de cálculo de costos de envío en un sistema de comercio electrónico.

⚙️ Codigo.

@IoTeacher
IoTeacher / raspi-motd.sh
Created March 7, 2024 22:01 — forked from piksel/raspi-motd.sh
Script for setting a nice raspberry pi logo as MOTD on debian.
#!/bin/bash
logo="$(tput setaf 2)
.~~. .~~.
'. \ ' ' / .'$(tput setaf 1)
.~ .~~~..~. $(tput sgr0) _ _ $(tput setaf 1)
: .~.'~'.~. : $(tput sgr0) ___ ___ ___ ___| |_ ___ ___ ___ _ _ ___|_|$(tput setaf 1)
~ ( ) ( ) ~ $(tput sgr0) | _| .'|_ -| . | . | -_| _| _| | | | . | |$(tput setaf 1)
( : '~'.~.'~' : ) $(tput sgr0) |_| |__,|___| _|___|___|_| |_| |_ | | _|_|$(tput setaf 1)
~ .~ ( ) ~. ~ $(tput sgr0) |_| |___| |_| $(tput setaf 1)

Mosh Python Cheatsheet

Disclaimer: I did not create this cheatsheet or the ideas within. All credit goes to Mosh Hamedani and his Python Cheatsheet that can be acquired through an email link, by visiting his YouTube tutorials or visiting his tutorial pages. This is a Markdown version of the original pdf that I retyped with a few typo corrections and notes for my own understanding.

Variables

We use variables to temporarily store data in computer's memory.

price = 10 # Integer
@IoTeacher
IoTeacher / README.md
Created January 31, 2024 21:15 — forked from roachhd/README.md
EMOJI cheatsheet 😛😳😗😓🙉😸🙈🙊😽💀💢💥✨💏👫👄👃👀👛👛🗼🔮🔮🎄🎅👻

EMOJI CHEAT SHEET

Emoji emoticons listed on this page are supported on Campfire, GitHub, Basecamp, Redbooth, Trac, Flowdock, Sprint.ly, Kandan, Textbox.io, Kippt, Redmine, JabbR, Trello, Hall, plug.dj, Qiita, Zendesk, Ruby China, Grove, Idobata, NodeBB Forums, Slack, Streamup, OrganisedMinds, Hackpad, Cryptbin, Kato, Reportedly, Cheerful Ghost, IRCCloud, Dashcube, MyVideoGameList, Subrosa, Sococo, Quip, And Bang, Bonusly, Discourse, Ello, and Twemoji Awesome. However some of the emoji codes are not super easy to remember, so here is a little cheat sheet. ✈ Got flash enabled? Click the emoji code and it will be copied to your clipboard.

People

:bowtie: 😄

@IoTeacher
IoTeacher / CMakeLists.txt
Created October 29, 2023 15:51 — forked from eldelto/CMakeLists.txt
Raspberry Pi Pico C/C++ SDK Example CMake File
cmake_minimum_required(VERSION 3.13)
include(pico_sdk_import.cmake)
project(test_project C CXX ASM)
set(CMAKE_C_STANDARD 11)
set(CMAKE_CXX_STANDARD 17)
pico_sdk_init()
add_executable(blink
@IoTeacher
IoTeacher / pi-tips.md
Created October 19, 2023 23:23 — forked from rdmarsh/pi-tips.md
Clean up the Raspbian default build for the Raspberry Pi

Remove unused packages on Raspberry Pi

(this is worth looking at http://www.stefan-seelmann.de/wiki/rasperrypi-homeserver, which is basically this:

apt-get purge --auto-remove scratch debian-reference-en dillo idle3 python3-tk idle python-pygame python-tk lightdm gnome-themes-standard gnome-icon-theme raspberrypi-artwork gvfs-backends gvfs-fuse desktop-base lxpolkit netsurf-gtk zenity xdg-utils mupdf gtk2-engines alsa-utils  lxde lxtask menu-xdg gksu midori xserver-xorg xinit xserver-xorg-video-fbdev libraspberrypi-dev libraspberrypi-doc dbus-x11 libx11-6 libx11-data libx11-xcb1 x11-common x11-utils lxde-icon-theme gconf-service gconf2-common

)

Warning: this will probably break something. If you need sound, don't remove the "alsa" packages

sudo apt-get --yes purge xserver-common x11-xfs-utils x11-xserver-utils xinit libsmbclient blt gvfs gvfs-backends gvfs-daemons gvfs-fuse idle idle-python2.7 idle-python3.2 idle3 libaudio2 libice6 liblightdm-gobject-1-0 libobrender27 libpulse0 libqt4-svg libqt

@IoTeacher
IoTeacher / pocketchip_debian10.md
Last active March 22, 2023 07:55 — forked from luzhuomi/pocketchip_debian10.md
A tutorial to upgrade NXT pocket C.H.I.P to Debian Buster

Pocket Chip Debian 10 Upgrade Guide

The purpose of this tutorial is to walk through the required steps to upgrade NXT chip (or pocketchip) from debian jessie to debian buster.

If you would like to start your Chip from scratch, follow the steps in the Preparation section.

Preparation (Optional)

A linux host machine, recommended Ubuntu 18.04. However I managed to do it with 20.10 with some tweak.

@IoTeacher
IoTeacher / README.rst
Created September 4, 2021 01:32 — forked from marianoguerra/README.rst
MQTT Generator Script

MQTT Generator

A simple python 3 script to generate sensor data from a config file and send it to an MQTT broker.

Usage

Download mqttgen.py and config.json files (click on the Raw button at the top right and then save the content), edit config.json to fit your needs, if you are using it to run the Event Fabric sensors dashboard then don't change the topic in config.json unless you want to change it in the dashboard too.

@IoTeacher
IoTeacher / setting.md
Created February 15, 2021 15:37 — forked from kid1412-net/setting.md
[calibre] ePub to PDF converting setting

Note: Use this setting in calibre to convert an ePub file to a printing PDF file

Look and Feel

  • Text justification: Justify text

Page Setup

  • Left: 72 pt.
  • Top: 72 pt.
  • Right: 34 pt.
  • Bottom: 72 pt.
@IoTeacher
IoTeacher / gdb-cheat_sheet.md
Last active February 5, 2024 20:08
GDB cheat sheet
GDB commands by function - simple guide
---------------------------------------
More important commands have a (*) by them.

Startup 
% gdb -help         	print startup help, show switches
*% gdb object      	normal debug 
*% gdb object core 	core debug (must specify core file)
%% gdb object pid  	attach to running process