Skip to content

Instantly share code, notes, and snippets.

View Lana-chan's full-sized avatar
🐿️
a

maple "mavica" syrup Lana-chan

🐿️
a
View GitHub Profile
@Lana-chan
Lana-chan / scalefixer.py
Created August 30, 2023 22:49
fix bad nearest-neighbor scaling and re-scale back up
"""
* ----------------------------------------------------------------------------
* "THE BEER-WARE LICENSE" (Revision 42 modified):
* <maple@maple.pet> wrote this file. As long as you retain this notice and
* my credit somewhere you can do whatever you want with this stuff. If we
* meet some day, and you think this stuff is worth it, you can buy me a beer
* in return.
* ----------------------------------------------------------------------------
"""
@Lana-chan
Lana-chan / discord-custom.css
Last active March 1, 2018 03:21
My personal custom CSS for Discord
/* bot badges */
.avatar-small[style*="/avatars/155799811134717952/"] + .member-inner .member-username::after, /* ash */
.avatar-small[style*="/avatars/128235170955264000/"] + .member-inner .member-username::after /* maple */
{
height: 14px;
line-height: 15px;
background: #7289da;
color: #fff;
-ms-flex-negative: 0;
border-radius: 3px;
@Lana-chan
Lana-chan / paws.pde
Last active March 8, 2019 19:01
Random Processing sketches
// Animated falling paw shapes
// originally posted as gist May 10, 2016
int pawcount = 50;
Paw[] paws = new Paw[pawcount];
float ang1, ang2;
void setup() {
size(800,600);
randomSeed(1994);
@Lana-chan
Lana-chan / login.py
Created February 19, 2018 22:27
interactive script for generating persistent clientcred and usercred files for mastodon.py
#!/usr/bin/python3
# interactive script for generating persistent
# clientcred and usercred files for mastodon.py
from mastodon import Mastodon
from getpass import getpass
import sys
if __name__ == "__main__":
@Lana-chan
Lana-chan / cp500.ino
Created May 15, 2016 01:30
Simple Arduino Mega sketch for reading a CP500 keyboard
const char* keysupp = "@ABCDEFGHIJKLMNOPQRSTUVWXYZ 0!\"#$%&'()*+<=>?";
const char* keysdwn = "@abcdefghijklmnopqrstuvwxyz 0123456789:;,-./";
const byte colCount = 8;
const byte colStart = 22;
const byte rowStart = colStart + colCount;
boolean pressed;
boolean held;
boolean shift;
@Lana-chan
Lana-chan / md.sh
Last active May 7, 2017 06:01
Bash script for batch uploading MP3s and FLACs into NetMD
#!/bin/bash
# This script expects music files named ## Title.ext where ## is the track number.
ls *.mp3 *.flac | while read i; do
ffmpeg -i "$i" out.wav < /dev/null
# ATRAC3Tool can be found here: https://github.com/Treeki/atrac3tool
wine ../atrac3tool.exe out.wav lp2.wav
rm out.wav
file=${i%%.*}
title=${file:3}
# linux-minidisc found here: https://github.com/Lana-chan/linux-minidisc