Skip to content

Instantly share code, notes, and snippets.

View lina-bh's full-sized avatar

Lina lina-bh

View GitHub Profile
#!/bin/sh
OUTPUT=eDP-1
mode() {
kscreen-doctor "output.${OUTPUT}.mode.${1}"
return $?
}
case "$1" in
"60") mode 2;;
"120") mode 1;;
*)
@lina-bh
lina-bh / csv2opml.py
Last active March 25, 2025 18:15
Transform Google Takeout YouTube subscriptions into OPML file for RSS readers.
import csv
import sys
import xml.etree.ElementTree as ET
opml = ET.Element("opml")
xmldoc = ET.ElementTree(element=opml)
body = ET.SubElement(opml, "body")
with open(sys.argv[1], "r") as f:
;; -*- lexical-binding: t; -*-
(eval-and-compile
(require 'cl-lib))
(defun ansible-doc (plugin)
(interactive "MPlugin: \n")
(let* (buffer
(sentinel (lambda (proc status)
(with-current-buffer buffer
(cond
#!/usr/bin/env python3
import json
import os
import os.path
import subprocess
import sys
progname = sys.argv[0]
os.chdir(os.path.dirname(os.path.realpath(__file__)))
use std::{borrow::Cow, collections::HashMap, ops::Range};
use std::error::Error;
pub struct FetchActivitiesParams {
term: u8,
cookies: HashMap<Vec<u8>, Vec<u8>>,
}
fn get_client() -> reqwest::Client {
return reqwest::Client::new();
#include "file.h"
ssize_t add(ssize_t, ssize_t); // exported definition
; vim: set ft=nasm
global _main
extern _puts
section .data
hello: db "hello, "
hello_len: equ $-hello
section .text
_main:
class EdgeList:
# feel the edge...
def __init__(self):
self.list = []
def insert(self, person1, person2):
if (person1, person2) not in self.list:
list.append((person1, person2))
def friends_of(self, person):
#include <stdio.h>
#define NOT !
while_loop() {
int i = 0;
// loop_head:
while (i < 10) {
i = i + 1;
}
; vim: set ft=nasm
global _main
extern _printf
section .data
fmt: db `%p\n`
section .text
align 8
_main: