Skip to content

Instantly share code, notes, and snippets.

View ilsubyeega's full-sized avatar

ilsubyeega

View GitHub Profile
/*
* LCD + INT + TIMER + ADC
Ports:
- PORTB: OC0 usage
- PORTC: LCD usage (defined in lcd4.h, modified via `#define`)
- PORTD: using INT1
- PORTE: LED-GREEN output, using PE1.
- PORTF: ADC purpose.
/*
* main.c
*
* Created: 4/2/2024 11:15:32 AM
* Author: DatNgo
*/
#include <xc.h>
#include <avr/io.h>
#include <avr/interrupt.h>
#include <xc.h>
#include <avr/io.h>
#include <avr/interrupt.h>
#include <util/delay.h>
int count = 0;
volatile int direction = 1;
// 1 for going right side, -1 for going left side.
int masks[] = { 0b11111000, 0b11110100, 0b11110010, 0b11110001 };
/*
* main.c
*
* Created: 4/17/2024 5:52:27 PM
* Author: USER
*/
#include <avr/io.h>
#include <util/delay.h>
#include <xc.h>
<script lang="ts">
import { onMount } from 'svelte';
let observer: ResizeObserver | undefined = undefined;
let topElement: HTMLDivElement;
let slotElement: HTMLDivElement;
onMount(() => {
console.log(slotElement.getBoundingClientRect());
observer = new ResizeObserver((_) => updateStyle());
@ilsubyeega
ilsubyeega / append-this-on-setting-css.css
Last active February 8, 2024 22:14
Dirty workaround of `firefox-gnome-theme` for `Tree Style Tab`
@media not (prefers-color-scheme: dark) {
:root[color-scheme="system-color"][data-user-agent*="Linux"] tab-item:not(.active):not(.bundled-active):not(.highlighted), :root[color-scheme="system-color"][data-user-agent*="Linux"] .after-tabs button, :root[color-scheme="system-color"][data-user-agent*="Linux"] .after-tabs [role="button"], :root[color-scheme="system-color"][data-user-agent*="Linux"] #subpanel-selector-anchor, :root[color-scheme="system-color"][data-user-agent*="Linux"] #background {
--toolbar-non-lwt-bgcolor: welp !important;
--toolbar-non-lwt-textcolor: welp !important;
}
:root.simulate-svg-context-fill tab-item:not(.collapsed) tab-twisty::before {
background: var(--in-content-tab-color) !important;
}
devices: (
{
name: "MX Master 3S";
smartshift:
{
on: true;
threshold: 255;
default_threshold: 255;
};
hiresscroll:
@ilsubyeega
ilsubyeega / example.md
Created December 9, 2023 06:45
Markdown to Anki

Chapter 01

  • AB
  • Problem 01
    • Answer A
    • Answer B
    • Answer C
    • Answer D
  • Problem 02
    • Answer A
  • Answer B
@ilsubyeega
ilsubyeega / inject.js
Created December 1, 2023 14:17
Undo/Delete every retweet/likes from your account using browser javascript
// undo every tweets
setInterval(() => {
for (const d of document.querySelectorAll('div[data-testid="unretweet"]')) {
d.click()
}
for (const d of document.querySelectorAll('div[data-testid="unretweetConfirm"]')) {
d.click()
}
window.scrollTo(0, document.body.scrollHeight)
}, 1000)