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
#!/usr/bin/env nix-shell | |
#!nix-shell -i sh -p websocat gst_all_1.gst-plugins-base gst_all_1.gst-plugins-good gst_all_1.gst-plugins-bad gst_all_1.gst-libav coreutils | |
set -ex | |
(lsmod | grep v4l2loopback >/dev/null) || sudo modprobe v4l2loopback video_nr=10 card_label=v4l2-iphone | |
websocat --binary ws://${IPAD:-shimarin}/ws | dd bs=8 skip=1 | gst-launch-1.0 fdsrc ! queue ! mpegvideoparse ! avdec_mpeg2video ! videoconvert ! videorate ! 'video/x-raw, format=YUY2, framerate=30/1' ! v4l2sink device=/dev/video10 sync=false |
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
#!/usr/bin/env nix-shell | |
#!nix-shell -i python3 -p "python3.withPackages (ps: [ps.astral ps.pytz])" | |
import dataclasses | |
import datetime | |
import enum | |
import functools | |
import itertools | |
import math | |
import subprocess | |
import time |
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
FROM debian:buster | |
RUN dpkg --add-architecture mipsel && apt-get update && apt-get install -y wget xz-utils | |
RUN wget https://downloads.openwrt.org/releases/19.07.2/targets/ramips/mt7621/openwrt-sdk-19.07.2-ramips-mt7621_gcc-7.5.0_musl.Linux-x86_64.tar.xz && tar xf openwrt-sdk-*.tar.* && rm openwrt-sdk-*.tar.* | |
ENV STAGING_DIR=/openwrt-sdk-19.07.2-ramips-mt7621_gcc-7.5.0_musl.Linux-x86_64/staging_dir | |
ENV PATH=/openwrt-sdk-19.07.2-ramips-mt7621_gcc-7.5.0_musl.Linux-x86_64/staging_dir/toolchain-mipsel_24kc_gcc-7.5.0_musl/bin:/root/.cargo/bin:$PATH:/usr/bin:/bin:/usr/sbin:/sbin | |
RUN wget https://sh.rustup.rs -O rustup-init && chmod +x rustup-init && ./rustup-init --profile minimal -y | |
RUN rustup target add mipsel-unknown-linux-musl | |
RUN apt-get install git --no-install-recommends -y | |
RUN git clone https://github.com/librespot-org/librespot | |
WORKDIR librespot |
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
ext.postBuildExtras = { | |
android.splits.density.enable = true | |
android.splits.density.compatibleScreens = ['small', 'normal', 'large', 'xlarge'] | |
ext.densityCodes = ['ldpi': 1, 'mdpi': 2, 'hdpi': 3, 'xhdpi': 4, 'xxhdpi': 5, 'xxxhdpi': 6] | |
android.applicationVariants.all { variant -> | |
variant.outputs.each { output -> | |
def baseDensityVersionCode = project.ext.densityCodes.get(output.getFilter("DENSITY")) | |
if (baseDensityVersionCode == null) { baseDensityVersionCode = 0 } | |
output.versionCodeOverride = android.defaultConfig.versionCode * 10 + baseDensityVersionCode | |
} |
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
#!/usr/bin/env python3 | |
import yaml, requests, os, argparse | |
with open(os.path.expanduser("~/budget.yaml")) as f: | |
data = yaml.load(f) | |
currency = data.get('settings', dict()).get('currency', None) | |
parser = argparse.ArgumentParser() | |
parser.add_argument("currency", default=currency, nargs=('?' if currency is not None else 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
#!/bin/bash | |
g++ -o sol sol.cpp | |
for((i=0;i<100;i++)) do | |
echo "Test $i" | |
./sol < fla$i.in > wyj.out | |
diff -w -q wyj.out fla$i.out | |
[[ $? -ne 0 ]] && break | |
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
#!/bin/bash | |
for i in {1..529} | |
do | |
wget https://upload.wikimedia.org/wikipedia/commons/5/54/Claude_Monet%2C_Impression%2C_soleil_levant.jpg | |
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
#!/usr/bin/env python3 | |
import argparse, tempfile, subprocess, os | |
parser = argparse.ArgumentParser() | |
parser.add_argument("-p", "--port", type=int, default=5004) | |
args = parser.parse_args() | |
conffd, conffile = tempfile.mkstemp(suffix="hostmenow") | |
os.close(conffd) # because it's idiotic | |
with open(conffile, "w") as f: | |
f.write(""" |
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
Verónica Guerrero, Isaiah Alyssa Mitchell and John Elijah Castillo met up in the exit near the stairway to discuss the amazement of life together. | |
"So what do you think about Pixie Lott?", said John. | |
"Isn't it a bit like down Budrosa?", said Isaiah. | |
"Reminds me of a ecstatic funeral director.", said John. | |
"Feels to me like thrifty neue slowenische kunst.", said Verónica. |
NewerOlder