Skip to content

Instantly share code, notes, and snippets.

View 4noha's full-sized avatar

Shinonome.Hatsuri 4noha

View GitHub Profile
echo 2 > /sys/class/gpio/export
echo out > /sys/class/gpio/gpio2/direction
sudo emacs /usr/bin/on
>
#!/bin/sh
echo 1 > /sys/class/gpio/gpio2/value
>
sudo nano /boot/config.txt
>
# uncomment to force a HDMI mode rather than DVI. This can make audio work in
# DMT (computer monitor) modes
hdmi_drive=2
>
amixer cset numid=3 1
# -*- coding: utf-8 -*-
import sys
import signal
import socket as skt
import math
from naoqi import ALProxy
class UDPServer():
@4noha
4noha / hoge.sh
Last active February 21, 2023 15:53
transpalented gifs to greenbacked mp4s .sh
for FILE in *.gif
do
FILENAME=`echo ${FILE} | sed 's/\.[^\.]*$//'`
ffmpeg -i ${FILENAME}.gif -movflags faststart -pix_fmt yuv420p -vf "color=00ff00,format=rgb24[c];[c][0]scale2ref[c][i];[c][i]overlay=format=auto:shortest=1,setsar=1,scale=trunc(iw/2)*2:trunc(ih/2)*2" ${FILENAME}.mp4
done
@4noha
4noha / HatsuriBadge.ino
Last active November 4, 2023 04:06
Hatsuri Badge for ESP32-2424S012 Round Display DEV MODULE(ESP32-C3-MINI-1U, GC9A01)
/*******************************************************************************
* PROGMEM Image Viewer
* This is a simple PROGMEM bitmap image viewer example
* Image Source: https://support.arduino.cc/hc/en-us/articles/360020652100
*
* How to create custom image:
* 1. Open image ith GIMP
* 2. Export Image as C-Source
* 3. Uncheck all option and check "Save as RGB565 (16-bit)"
* 4. Revise exported file just like "Arduino_UNO_Rev3_Ok.c"