Skip to content

Instantly share code, notes, and snippets.

View twizmwazin's full-sized avatar
🦀

Kevin Phoenix twizmwazin

🦀
  • Arizona State University
  • Tempe, AZ
View GitHub Profile
@twizmwazin
twizmwazin / docker-x11.md
Created January 17, 2025 19:40
X11 Docker example

X11 Docker Example

Take the following dockerfile:

FROM debian:bookworm
RUN apt-get update && apt-get install -y firefox-esr
CMD firefox
local ret_status="%(?:%{$fg_bold[green]%}➜ :%{$fg_bold[red]%}➜ %s)"
#function git_prompt_info() {
# ref=$(git symbolic-ref HEAD 2> /dev/null) || return
# echo "$ZSH_THEME_GIT_PROMPT_PREFIX$(current_branch)$ZSH_THEME_GIT_PROMPT_SUFFIX$(parse_git_dirty)"
#}
function get_pwd(){
git_root=$PWD
while [[ $git_root != / && ! -e $git_root/.git ]]; do
import java.lang.StringBuilder;
class BuilderTest {
public static void main(String args[]) {
long start = System.currentTimeMillis();
for (int i = 0; i < 100000; ++i) {
StringBuilder b = new StringBuilder();
b.append("1");
b.append("2");
b.append("3");
Section "Device"
Identifier "Intel Graphics"
Driver "intel"
Option "DRI" "3"
Option "TearFree" "true"
Option "SwapbuffersWait" "true"
EndSection
import java.lang.Integer;
import java.util.Random;
public class PiGenorator {
public static void main(String[] args) {
try {
int seed = Integer.parseInt(args[0]);
int trials = Integer.parseInt(args[1]);
Random random = new Random(seed);
@twizmwazin
twizmwazin / map.xml
Last active August 29, 2015 14:16
Iced Wars
<?xml version="1.0" encoding="UTF-8"?>
<map proto="1.3.6">
<name>Iced Wars</name>
<version>1.0.0</version>
<objective>Leak the enemy core and bring their wools back to your victory monument!</objective>
<authors>
<author uuid="1e79acd3-562e-42d4-9a6c-e923f5284329" />
<author uuid="4c8b644b-4c7f-48db-92b1-f3aee86a328d" />
</authors>
<contributors>
@twizmwazin
twizmwazin / build.py
Created February 17, 2015 06:37
SportBukkit Build Script
#!/bin/python
#
# Copyright 2015 Kevin Phoenix. All rights reserved.
#
# Temporary script written to automatically compile SportBukkit 1.8 builds
# from the real1.8 branch. To run this script, git, maven, and bash need to
# be accessible from the command line.
import os
import shutil
<map proto="1.3.6">
<name>Pine Island</name>
<objective>Be the first team to reach 1,000 points!</objective>
<authors>
<author>King_Coolwhip</author>
</authors>
<teams>
<team color="dark red" max="32">Red Team</team>
<team color="blue" max="32">Blue Team</team>
</teams>
@twizmwazin
twizmwazin / en
Last active August 29, 2015 14:14 — forked from MarcRoizman/en
<?xml version="1.0" encoding="UTF-8"?>
<locale lang="en">
<error>
<restartDuringMatch>You may not restart during a match. Use -f to override.</restartDuringMatch>
<cycleDuringMatch>You may not cycle during a match. Use -f to override.</cycleDuringMatch>
<matchRunning>Match is already running.</matchRunning>
<matchNoResume>Match has finished and may not be resumed.</matchNoResume>
<matchNoStart>Match could not be started at this time.</matchNoStart>
<matchNoEnd>Match could not be ended at this time.</matchNoEnd>
<noSetNext>You may not set the next map when a restart is queued. Use -f to override.</noSetNext>
@twizmwazin
twizmwazin / map.xml
Last active August 29, 2015 14:13
Ashwood Grove XML
<?xml version="1.0" encoding="UTF-8"?>
<map proto="1.3.5">
<name>Ashwood Grove</name>
<version>1.0.0</version>
<objective>Team with the most kills after 15 minutes wins</objective>
<authors>
<author contribution="Map Maker">samtheman43</author>
<author contribution="Aesthetics and XML">ultamategamer16</author>
</authors>
<contributors>