Skip to content

Instantly share code, notes, and snippets.

@cheriimoya
cheriimoya / nextcloud-deck-export-import.py
Last active December 22, 2021 15:06 — forked from svbergerem/nextcloud-deck-export-import.py
Nextcloud Deck Export/Import
#!/usr/bin/env nix-shell
#!nix-shell -p "python3.withPackages(ps: [ ps.requests ])"
import requests
urlFrom = 'https://cloud.domainfrom.tld'
authFrom = ('username', 'password')
urlTo = 'https://nextcloud.domainto.tld'
authTo = ('username', 'password')
headers={'OCS-APIRequest': 'true', 'Content-Type': 'application/json'}
@cheriimoya
cheriimoya / build_lineage_for_davinci.md
Last active September 24, 2024 15:40
This will hopefully help you to build LineageOS 17.1 for the Xiaomi davinci.

LineageOS build guide for n00bs like me

Soo you want to build LineageOS (los) for your xiaomi davinci?

This guide will show you how! In this guide i'll lead you through the process of compiling los 17.1 for xiaomis MI 9T, optionally with spoofing support for microG.

I am not responsible for any damage you do to your phone and this guide does

@cheriimoya
cheriimoya / contact_filter.py
Created March 29, 2020 09:22
contact_filter.py <contacts.csv>
from sys import argv
import vobject
with open(argv[1]) as f:
contacts_object = vobject.readComponents(f)
contacts = []
try:
while True:

Arduino Connection on NixOS

First we need lsusb command from the usbutils package.

> nix-env -i usbutils
> lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 011: ID 0403:6001 FTDI FT232 USB-Serial (UART) IC
# Init Prompt and completion
autoload -U compinit promptinit
compinit
promptinit
export EDITOR=nano
#aliases
source ~/.zsh_aliases
# we don't need a history in less #############################################
public class Main {
public static void main(String[] args) {
System.out.println("fakuiter ist: " + fakuIter(4));
System.out.println("fakureku ist: " + fakuReku(4));
}
static int fakuIter(int n){
int ergebnis = 1;
for (int i = 1; i <= n; i++) {
function keepNumbers(mixedarray){
//create empty array to store the numbers in
let numberarray = [];
//for each element in the array call the anonymous function...
mixedarray.forEach(
//... right here
function(element) {
//check if the element type is "number"
if (!File.Exists("benchmark.bin")) {
PerformanceMark newBenchmark = Connector.DoBenchmark();
File.WriteAllBytes("benchmark.bin", Connector.SaveBenchmark());
} else {
Connector.LoadBenchmark(File.ReadAllBytes("benchmark.bin"));
}
int jetzt;
int bildTimer;
void setup(){
erstelle();
}
void draw(){
import websockets.*;
WebsocketClient wc;
ArrayList<String> nachrichten;
boolean newMessages = false;
String toSend;
boolean ready = false;
String name = "user";
void setup() {