Skip to content

Instantly share code, notes, and snippets.

View NoraCodes's full-sized avatar
🦀
rusting away

Leonora Tindall NoraCodes

🦀
rusting away
View GitHub Profile
@NoraCodes
NoraCodes / SCFAonLinux.md
Last active April 4, 2024 13:26
Supreme Commander: Forged Alliance with Steam on Linux with PlayOnLinux

This guide is out of date. Use https://github.com/FAForever/faf-linux instead.

Install PlayOnLinux with your package manager (i.e. sudo apt-get install playonlinux). Then, type playonlinux and wait for it to refresh its list.

Install Steam under PlayOnLinux. Once Steam is running, exit it, select its entry in PlayOnLinux, and select Configure.

I suggest using Wine 1.7.8-d3d doublebuffer

Now go to the "Install Components" section and install, in any order: d3dx9, directx9, dotnet40

@NoraCodes
NoraCodes / weyland-yutani.sh
Created May 29, 2015 17:34
weyland-yutani.sh
#!/bin/bash
echo -e '\033[0;33m\n \033[1;37m W E Y L A N D - Y U T A N I C O R P\033[0;33m\n\n xxxx \033[1;37m.......\033[0;33m xxxxxxx \033[1;37m.......\033[0;33m xxxx\n xxxx \033[1;37m.....\033[0;33m xxxx xxxx \033[1;37m.....\033[0;33m xxxx\n xxxx \033[1;37m...\033[0;33m xxxx \033[1;37m...\033[0;33m xxxx \033[1;37m...\033[0;33m xxxx\n xxxx xxxx \033[1;37m.....\033[0;33m xxxx xxxx\n xxxxxxx \033[1;37m.......\033[0;33m xxxxxxx\n\n \033[1;37mBUILDING BETTER WORLDS\033[0;33m\n'
echo -e 'Welcome to the Weyland-Yutani Corporate Operating System. \nYou are using \033[1;37mWeyland-Yutani Corp.' $(uname -o) '\033[0;33mon\033[1;37m' $(uname -p)'\033[0;33m, version\033[1;37m' $(uname -r)
echo -e '\033[0;33mThis is a Level U Prompt for:\033[1;37m' $(whoami) '\033[0;33mon\033[1;37m' $(hostname)
echo -e '\033[0;33mUse the \033[1;37msudo\03
@NoraCodes
NoraCodes / weyland-yutani.bashrc
Created May 29, 2015 17:38
Weyland Yutani .bashrc (requires my other gist, weyland-yutani.sh)
# ... History config and such here
# set variable identifying the chroot you work in (used in the prompt below)
if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then
debian_chroot=$(cat /etc/debian_chroot)
fi
# set a fancy prompt (non-color, unless we know we "want" color)
case "$TERM" in
xterm-color) color_prompt=yes;;
@NoraCodes
NoraCodes / quicksortcolor.c
Created August 23, 2015 15:40
C implementation of quicksort which colors the values being swapped for instructional purpouses.
/*
Algorithm Practice: Quicksort
*/
#include <stdio.h>
#define ARRAY_LENGTH 32
int array[ARRAY_LENGTH]; // The array to be sorted
@NoraCodes
NoraCodes / RamViz.py
Created August 24, 2015 23:17
RamViz allocation visualizer
# RamViz - a RAM-allocation algorithm visualizer
# Designed to allow people writing kernels, memory managers, etc to
# visually inspect the operation of their algorithms.
# Operates with 64 blocks of RAM by default
# Call "Memory.alloc(block, type)" and "Memory.dealloc(memory)" to change the
# state of blocks of memory.
# Using __is_alloc() in your own scripts is cheating.
import sys
import random
@NoraCodes
NoraCodes / soaser_on_linux.md
Last active May 21, 2016 11:52
Sins Of A Solar Empire: Rebellion and Sins of the Prophets on Linux

How to Run SoaSE:R on Linux

Install playonlinux from your distribution. Then, through playonlinux, install Windows Steam.

Only a few tweaks need to be made in order to run SoaSE:R. Open the configuration

  1. In Video, set Offscreen Render Mode to backbuffer (NOTE: This is not required in windowed mode, as far as I know).
  2. Install d3dx9 and dotnet45
  3. Paste export PULSE_LATENCY_MSEC=60 into Misc -> Command to execute before running the program
#!/bin/sh
### set variables
#destinations you don't want routed through Tor
_non_tor="192.168.1.0/24 192.168.0.0/24"
#the UID that Tor runs as (varies from system to system)
_tor_uid="109"
#Tor's TransPort
@NoraCodes
NoraCodes / cellauto.py
Created January 14, 2016 01:42
CellAuto.py - Python terminal cellular automata.
#! /usr/bin/env python3
from shutil import get_terminal_size
from random import choice
columns = get_terminal_size().columns - 4
rows = get_terminal_size().lines
options = [' ', '█']
def ca_rule(row, options):
@NoraCodes
NoraCodes / pig.py
Created February 14, 2016 02:06
A game of pig, in Python 3
import random
command = ""
turns = 0
totalScore = 0
turnScore = 0
while totalScore < 25:
print("Turn: {} Score: {} in {} turns.".format(turnScore, totalScore, turns))
command = input("command> ").lower()

Keybase proof

I hereby claim:

  • I am silverwingedseraph on github.
  • I am lfstindall (https://keybase.io/lfstindall) on keybase.
  • I have a public key whose fingerprint is 1908 B58F 1281 9BD8 A6CB 804B D842 5D4D 2DF2 DD84

To claim this, I am signing this object: