- Setup
-
Don't use
sudo apt install platformiobut if you did, trysudo apt remove platformiobefore proceeding further. -
Install
python-venv:sudo apt-get install python3-venv -
Install PlatformIO :
| # 1. Create the missing plugdev group | |
| sudo groupadd plugdev | |
| # 2. Add your user to it | |
| sudo usermod -aG plugdev $USER | |
| # 3. Apply the group change immediately to your current terminal | |
| newgrp plugdev | |
| # 4. Add current user to the required USB access groups |
| ; ============================================================================== | |
| ; Minimal Z180 Boot & Serial Test Code | |
| ; Target: Z8S180 | |
| ; ============================================================================== | |
| ; Z180 Internal I/O Register Addresses (Default Map: 00h - 3Fh) | |
| DREQ0 equ 04h ; DMA Request 0 | |
| STAT0 equ 08h ; ASCI Status Register Channel 0 | |
| TDR0 equ 09h ; ASCI Transmit Data Register Channel 0 | |
| CNTLA0 equ 00h ; ASCI Control Register A Channel 0 |
| ; ========================================================================= | |
| ; Minimal eZ80 Assembly Boot Code | |
| ; Targets: eZ80F91 / General eZ80 Series | |
| ; ========================================================================= | |
| ASSUME ADL = 1 ; Instruct assembler to output 24-bit ADL opcodes | |
| ORG $000000 ; Power-On Reset Vector | |
| reset_vector: |
| general { | |
| lock_cmd = omarchy-lock-screen # lock screen and 1password | |
| before_sleep_cmd = loginctl lock-session # lock before suspend. | |
| after_sleep_cmd = hyprctl dispatch dpms on # to avoid having to press a key twice to turn on the display. | |
| inhibit_sleep = 3 # wait until screen is locked | |
| } | |
| listener { | |
| timeout = 150 # 2.5min | |
| on-timeout = pidof hyprlock || omarchy-launch-screensaver # start screensaver (if we haven't locked already) |
| # See https://wiki.hyprland.org/Configuring/Monitors/ | |
| # List current monitors and resolutions possible: hyprctl monitors | |
| # Format: monitor = [port], resolution, position, scale | |
| # Optimized for retina-class 2x displays, like 13" 2.8K, 27" 5K, 32" 6K. | |
| env = GDK_SCALE,1.75 | |
| monitor=,preferred,auto,auto | |
| # monitor=eDP-1,disable | |
| # monitor=HDMI-A-1,2560x1440@120,auto,1#,mirror,eDP-1 |
| # Use Ctrl-C to exit insert mode and return to normal mode | |
| [keys.insert] | |
| "C-c" = "normal_mode" | |
| # Also use Ctrl-C to exit select mode | |
| [keys.select] | |
| "C-c" = ["normal_mode", "keep_primary_selection", "collapse_selection"] | |
| #[keys.normal] | |
| # ... other existing keybindings ... |
| <script> | |
| (r=()=>setInterval(t=>{for(j=o="\n",y=5;y--;document.body["inn" | |
| +"erHTML"]="<pre><"+(S="script>\n")+o+"\n\n</"+S)for(x=-01; | |
| 63-!y>x++;o+=`(r=${r})()`[j++].fontcolor(c?"#FF0":"#444"))c=x/2 | |
| %4<3&&parseInt("odRFacb67o2vi5gmOZmwFNteohbOh3sw".slice(i="9"<( | |
| D=Date()[16+(x/8|0)])?30:D*3,i+3),36)&1<<(x/2|0)%4+3*y},100))() | |
| </script> |
| #include <Wire.h> | |
| #include <LiquidCrystal_I2C.h> | |
| #include <ESP8266WiFi.h> | |
| #include <WiFiClient.h> | |
| #include <ArduinoJson.h> | |
| // Change ID/PWD | |
| const char* ssid = "YOUR_SSID"; | |
| const char* password = "YOUR_PASSWORD"; | |
| LiquidCrystal_I2C lcd(0x27, 16, 2); // I2C Address of LCD 16x02 |
| // cc -w -include time.h -o qlock qlock.c // MIT Copyright (c) Tsoding | |
| char*s="// cc -w -include time.h -o qlock qlock.c // MIT Copyright (c) Tsoding\n" | |
| "char*s=\"?\";x,y,d[8],i,dx;f[]={31599,19812,14479,31207,23524,29411,29679,\n" | |
| "30866,31727,31719,1040};char*so,*si;p(ch){i=x/2/(3+2);dx=x/2%(3+2);if(i<8&&(y-5)\n" | |
| "/2<5&&dx<3&&(f[d[i]]>>((5-(y-5)/2-1)*3+dx))&1)printf(\"\\033[1;41;30m%c\\033[0m\",ch\n" | |
| ");else printf(\"%c\",ch);if(ch=='\\n'){y+=1;x=0;}else x+=1;}gd(){time_t t=time(NULL);struct\n" | |
| " tm*tm=localtime(&t);d[0]=tm->tm_hour/10;d[1]=tm->tm_hour%10;d[2]=10;d[3]=tm->tm_min\n" | |
| "/10;d[4]=tm->tm_min%10;d[5]=10;d[6]=tm->tm_sec/10;d[7]=tm->tm_sec%10;}main(){for\n" | |
| "(gd();;printf(\"\\n\\033[%dA\\033[%dD\",y+1,x),sleep(1),gd())for(so=s,x=0,y=0;*so;so++\n" | |
| ")if(*so==63)for(si=s;*si;si++)switch(*si){case'\\n':p('\\\\');p('n');p('\"');p('\\n')\n" |