Skip to content

Instantly share code, notes, and snippets.

View vaslabs's full-sized avatar
🏠
Working from home

Vasilis Nicolaou vaslabs

🏠
Working from home
View GitHub Profile
#!/usr/bin/python
from operator import itemgetter
from PIL import Image, ImageDraw, ImageFont
# Make a lowercase + uppercase alphabet.
alphabet = 'abcdefghijklmnopqrstuvwxyz'
alphabet += ''.join(map(str.upper, alphabet))
#alphabet="z"
import json
import sys
def old2new(oldjs):
newjs = []
for entry in oldjs:
newEntry = {"name":entry["name"], "grades":[]}
for key in entry:
if key == "name":
continue
<script src="http://code.jquery.com/jquery-1.11.3.min.js"></script>
<script src="http://knockoutjs.com/downloads/knockout-3.3.0.js" type="text/javascript"></script>
<script type="text/css">
meta.foundation-version{font-family:"/5.5.2/"}meta.foundation-mq-small{font-family:"/only screen/";width:0}meta.foundation-mq-small-only{font-family:"/only screen and (max-width: 40em)/";width:0}meta.foundation-mq-medium{font-family:"/only screen and (min-width:40.0625em)/";width:40.0625em}meta.foundation-mq-medium-only{font-family:"/only screen and (min-width:40.0625em) and (max-width:64em)/";width:40.0625em}meta.foundation-mq-large{font-family:"/only screen and (min-width:64.0625em)/";width:64.0625em}meta.foundation-mq-large-only{font-family:"/only screen and (min-width:64.0625em) and (max-width:90em)/";width:64.0625em}meta.foundation-mq-xlarge{font-family:"/only screen and (min-width:90.0625em)/";width:90.0625em}meta.foundation-mq-xlarge-only{font-family:"/only screen and (min-width:90.0625em) and (max-width:120em)/";wi
@vaslabs
vaslabs / README.md
Last active January 14, 2022 06:58
Astronomy image stacking scripts

Sbt snippets I find useful

import io.vavr.control.Either;
import io.vavr.control.Try;
import java.time.Clock;
import java.time.ZonedDateTime;
import java.util.List;
import java.util.Optional;
import java.util.function.Function;
class Snippets {
public static Either<String, Integer> toInt(String text) {
#!/bin/bash
# Adapted from https://www.toptensoftware.com/blog/running-ea-origin-games-under-linux-via-steam-and-proton/
# Add custom windows exe to steam (usually it's an installer)
# this creates a directory with a big number as an id, look for it
# in .steam/steam/steamapps/compatdata
COMPATDIR=3999685975
# Pick a Proton Version (steam/steamapps/Proton... for official steam protons)
PROTONVER=root/compatibilitytools.d/Proton-6.1-GE-2
@vaslabs
vaslabs / Run.sh
Last active May 8, 2021 22:22
worms_fix_fedora_33
#!/bin/bash
export LC_ALL=C
export DBUS_FATAL_WARNINGS=0
export LD_LIBRARY_PATH="/usr/lib:/usr/local/lib"
@vaslabs
vaslabs / haven_fix_guide.md
Last active March 14, 2021 10:30
Fix Haven on Fedora 33

Clone mf-install

git clone https://github.com/z0z0z/mf-install.git
cd mf-install

Comment out 32 bit calls

vi mf-install.sh
#wine start regedit.exe mf.reg
@vaslabs
vaslabs / overcooked_all_you_can_eat_p2.gamecontroller.amgp
Created April 6, 2021 12:55
overcooked_all_you_can_eat_second_player_keyboard_mapping_antimicrox
<?xml version="1.0" encoding="UTF-8"?>
<gamecontroller configversion="19" appversion="3.0">
<stickAxisAssociation index="2" xAxis="3" yAxis="4"/>
<stickAxisAssociation index="1" xAxis="1" yAxis="2"/>
<vdpadButtonAssociations index="1">
<vdpadButtonAssociation axis="0" button="12" direction="1"/>
<vdpadButtonAssociation axis="0" button="13" direction="4"/>
<vdpadButtonAssociation axis="0" button="14" direction="8"/>
<vdpadButtonAssociation axis="0" button="15" direction="2"/>
</vdpadButtonAssociations>