Skip to content

Instantly share code, notes, and snippets.

View JoshuaWierenga's full-sized avatar

Joshua Wierenga JoshuaWierenga

View GitHub Profile
x11/xcb libaries can be built with
CC=x86_64-unknown-cosmo-cc PKG_CONFIG_PATH=$PWD/../output/share/pkgconfig:$PWD/../output/lib/pkgconfig ./autogen.sh --prefix=$PWD/../output --disable-shared --enable-static
make
make install
sdl2 can be built with
./autogen.sh
CC=x86_64-unknown-cosmo-cc PKG_CONFIG_PATH=$PWD/../output/share/pkgconfig:$PWD/../output/lib/pkgconfig ./configure --prefix=$PWD/../output --disable-shared --enable-static --disable-diskaudio --disable-pulseaudio --disable-sndio --disable-video-kmsdrm --disable-video-opengles2 --disable-video-wayland --disable-video-vulkan --enable-video-x11 --disable-dbus --disable-ime --disable-fcitx --disable-joystick-virtual --disable-cpuinfo --disable-joystick --disable-haptic --disable-hidapi --disable-sensor --disable-power --disable-locale --disable-loadso --x-includes=/home/joshua/src/src/cosmo/gui/xlib/output/include --x-libraries=/home/joshua/src/src/cosmo/gui/xlib/output/lib
make
make install
@JoshuaWierenga
JoshuaWierenga / cygwintest.sh
Created January 9, 2023 05:47
Script to test blink on cygwin, partially automated but need to test redbean and use blinkenlights manually.
#! /bin/sh
coreCount=$(($(nproc) + 1))
if [ "$1" != "-s" ]; then
make -j$coreCount clean
make -j$coreCount
printf "\n"
fi
@JoshuaWierenga
JoshuaWierenga / wslinstallarch.sh
Last active October 2, 2022 12:48
Script for Ubuntu 22.04 WSL2 to setup qemu user mode emulation for a different archecture using cloud images
#! /bin/sh
# Ubuntu 22.04 WSL2 qemu user mode emulation setup 0.4.0
version="0.4.0"
usage()
{
echo "Ubuntu 22.04 WSL2 qemu user mode emulation setup $version
Usage: $0 [general and mode specific flags] [-i or -e] architecture
@JoshuaWierenga
JoshuaWierenga / setupflutterlinux.sh
Last active January 19, 2022 12:23
Script to setup ubuntu wsl2 for flutter linux application development
#!/bin/bash
# There are some potential problems with this as previously I needed to install a never version of mesa from ppa:oibaf/graphics-drivers
# for flutter apps to work as otherwise only a white window would appear with various opengl related errors in the console.
# This may have been fixed by switching from gwsl to regular vcxsrv to ensure -nowgl was used and -wgl wasn't.
# Additionally it would be useful to work around cmake issues during the session this runs in by remounting the windows partition rather than
# forcing a wsl2 restart.
# Would also be nice to clean up the console output, for example hiding tee's(or cat's?) output.
# To run use
@JoshuaWierenga
JoshuaWierenga / texturelocations.py
Last active May 13, 2016 10:32
Finding texture locations for quantum break models
import os
def get_Texture_Names(metafile, dirty):
infile = open(metafile, "r")
text = ""
line = infile.readline()
while line != '' and not "m_vecReferencedFiles" in line:
line = infile.readline()
@JoshuaWierenga
JoshuaWierenga / encoderanddecoder.py
Last active November 19, 2015 08:18 — forked from adrianmester/vigenere.py
vigenere encoding and decoding in python
#-----------------------------------------------------
# Uses vigenere.py by ilogik
# https://gist.github.com/ilogik/6f9431e4588015ecb194
#-----------------------------------------------------
import base64
def encode(key, string):
encoded_chars = []
for i in xrange(len(string)):