This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var css = 'rgb(128,128,128)'; | |
var channels={}; | |
[channels.red, channels.green, channels.blue] = css.replace(/[rgb\(\) ]/g, '').split(','); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Stepper Motor Joystick Control | |
This program drives a bipolar stepper motor with DRV8825 driver. | |
The driver is attached to digital pins 8 - 13 of the Arduino. | |
The joystick is attached to analog pin A0 (X axis) and digital pin 2 (switch) | |
The motor rotation is controlled by X axis of the joystick. | |
The switch brings motor back to its initial position |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import sys | |
import os | |
import requests | |
import argparse | |
import configparser | |
from art import * | |
argument_parser = argparse.ArgumentParser() | |
argument_parser.add_argument( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
import smbus | |
first = 0x03 | |
last = 0x77 | |
def i2cdetect(bus_id=0): | |
bus = smbus.SMBus(bus_id) | |
print('Bus: I2C-{}'.format(bus_id)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Collection of useful aliases by Cyril BOSSELUT | |
# This method call the Neofetch app with a random ASCII image | |
# ASCII images are .txt file stored in ~/.ascii folder | |
function welcome_message() { | |
ascii_file=`fd . ~/.ascii -t f -e txt | shuf -n 1` | |
neofetch --ascii $ascii_file --bar_char '#' '-' --bar_colors 4 1 | |
} | |
# Set 'history' format to show more useful info |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
#### | |
## VM's keyboard | |
#### | |
Board: Arduino Micro | |
Tested with versions: | |
Arduino IDE 1.8.12 | |
Libraries (and version used to develop the project): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# _____ _____ _ _ _ _ _ _ | |
# / ___| / ___| | | | | | | | | | | | | |
# \ `--. ___ _ __ ___ ___ _ __ \ `--.| |_ __ _| |_ _ _ ___ | | | | __ _| |_ ___| |__ ___ _ __ | |
# `--. \/ __| '__/ _ \/ _ \ '_ \ `--. \ __/ _` | __| | | / __| | |/\| |/ _` | __/ __| '_ \ / _ \ '__| | |
# /\__/ / (__| | | __/ __/ | | | /\__/ / || (_| | |_| |_| \__ \ \ /\ / (_| | || (__| | | | __/ | | |
# \____/ \___|_| \___|\___|_| |_| \____/ \__\__,_|\__|\__,_|___/ \/ \/ \__,_|\__\___|_| |_|\___|_| | |
# | |
# Copyright (C) 2023 Cyril Bosselut | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
########################################################################################################################################## | |
# _____ .___.__ ________ __ __ _________ .__ __ .__ # | |
# / _ \ __ __ __| _/|__| ____ \_____ \ __ ___/ |_______ __ ___/ |_ / _____/_ _ _|__|/ |_ ____ | |__ ___________ # | |
# / /_\ \| | \/ __ | | |/ _ \ / | \| | \ __\____ \| | \ __\ \_____ \\ \/ \/ / \ __\/ ___\| | \_/ __ \_ __ \ # | |
# / | \ | / /_/ | | ( <_> ) / | \ | /| | | |_> > | /| | / \\ /| || | \ \___| Y \ ___/| | \/ # | |
# \____|__ /____/\____ | |__|\____/ \_______ /____/ |__| | __/|____/ |__| /_______ / \/\_/ |__||__| \___ >___| /\___ >__| # | |
# \/ \/ \/ |__| \/ \/ \/ \/ # |