This file contains hidden or 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
| /******************************************************************************* | |
| * 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" |
This file contains hidden or 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
| 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 |
This file contains hidden or 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
| # -*- coding: utf-8 -*- | |
| import sys | |
| import signal | |
| import socket as skt | |
| import math | |
| from naoqi import ALProxy | |
| class UDPServer(): |
This file contains hidden or 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
| 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 | |
This file contains hidden or 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
| 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 | |
| > |
This file contains hidden or 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
| # install nvm for system-wide | |
| sudo apt install git | |
| cd /usr/local | |
| git clone git://github.com/creationix/nvm.git nvm | |
| . /usr/local/nvm/nvm.sh | |
| sudo emacs /etc/profile.d/nvm.sh | |
| > | |
| source /usr/local/nvm/nvm.sh | |
| > |
This file contains hidden or 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
| sudo emacs /etc/network/interfaces | |
| > | |
| auto eth0 | |
| iface eth0 inet dhcp | |
| allow-hotplug wlan0 | |
| auto wlan0 | |
| iface wlan0 inet static | |
| address 192.168.1.1 |
This file contains hidden or 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
| require 'ftdi' | |
| @ctx = Ftdi::Context.new | |
| @ctx.usb_open_desc(0x0403, 0x6001,nil,"00000000") | |
| @ctx.set_bitmode(0x3f, :bitbang) | |
| @ctx.read_pins | |
| @ctx.write_data [0x03] |
This file contains hidden or 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
| [Unit] | |
| Description=homehub | |
| [Service] | |
| Type=simple | |
| WorkingDirectory=/home/nokkii/works/homehub | |
| ExecStart=/usr/local/opt/rbenv/shims/ruby /home/nokkii/works/homehub/app.rb | |
| ExecStop=pkill -KILL -f "ruby app.rb" | |
| ExecReload=pkill -KILL -f "ruby app.rb" && /usr/local/opt/rbenv/shims/ruby /home/nokkii/works/homehub/app.rb | |
| TimeoutStopSec=5 |
NewerOlder