Skip to content

Instantly share code, notes, and snippets.

View samrocketman's full-sized avatar

Sam Gleske samrocketman

View GitHub Profile
//http://chrisbroadfoot.id.au/2008/08/06/groovy-threads/
//http://docs.groovy-lang.org/latest/html/gapi/groovy/transform/Synchronized.html
//https://github.com/jenkinsci/jenkins-scripts/blob/master/scriptler/findOfflineSlaves.groovy
import java.util.concurrent.locks.ReentrantLock
ReentrantLock.metaClass.withLock = {
lock()
try {
it()
@samrocketman
samrocketman / fallout3ini-wine.patch
Last active April 9, 2017 20:27
FALLOUT.INI patch for WINE.
--- FALLOUT.INI.default 2012-11-13 21:03:31.824656147 +0100
+++ FALLOUT.INI 2012-11-29 16:20:30.548148502 +0100
@@ -75,8 +75,8 @@
bRunVTuneTest=0
STestFile1=
bActivateAllQuestScripts=0
-bUseThreadedBlood=0
-bUseThreadedMorpher=0
+bUseThreadedBlood=1
+bUseThreadedMorpher=1
@samrocketman
samrocketman / osx_wine_fallout3.md
Last active September 27, 2024 20:37
Fallout 3 Mac OS X on WINE. STALKER Call of Pripyat Mac OS X on WINE.

Windows-only games on Mac OS X

Achieved with WINE. None of the online tutorials were sufficient so I created this.

Games and settings

I've played the following Windows-only games with zero performance issues.

  • Fallout 3 GOTY Edition
  • S.T.A.L.K.E.R.: Call of Pripyat
@samrocketman
samrocketman / .gitignore
Last active April 3, 2025 19:02
A gitignore for ignoring common binary files
#common document extensions (case insensitive)
**.[pP][dD][fF]
**.[dD][oO][cC]
**.[dD][oO][tT]
**.[dD][oO][cC][xX]
**.[dD][oO][cC][mM]
**.[dD][oO][tT][xX]
**.[dD][oO][tT][mM]
**.[dD][oO][cC][bB]
**.[pP][pP][tT][xX]

Keybase proof

I hereby claim:

  • I am samrocketman on github.
  • I am samrocketman (https://keybase.io/samrocketman) on keybase.
  • I have a public key whose fingerprint is 8D8B F0E2 42D8 A068 572E BF3C E8F7 3234 7257 E65F

To claim this, I am signing this object:

@samrocketman
samrocketman / build.gradle
Created January 17, 2015 04:45
A failing test case for extended properties in build -> dependencies section of gradle.
apply plugin: 'groovy'
ext { groovyVersion = "1.8.9" }
println "Using Groovy ${project.groovyVersion}"
buildscript {
repositories { mavenCentral() }
dependencies {
//classpath "org.codehaus.groovy:groovy-all:${groovyVersion}"
}
@samrocketman
samrocketman / show-ip-before-login.sh
Last active March 28, 2016 12:55 — forked from rm/show-ip-before-login.sh
Show IP address on prelogin message
#!/bin/bash
# based on http://offbytwo.com/2008/05/09/show-ip-address-of-vm-as-console-pre-login-message.html
# based on https://gist.github.com/rm/3780228
# A better IP address method https://www.linuxquestions.org/questions/blog/sag47-492023/using-a-script-to-get-your-ip-address-35251/
# need to be root to write out these files
if [ "$(id -u)" != "0" ]; then
echo "Need to run as root. Maybe use sudo..."
exit
fi
#!/bin/sh
# based on http://offbytwo.com/2008/05/09/show-ip-address-of-vm-as-console-pre-login-message.html
# need to be root to write out these files
if [ `id -u` != 0 ]; then
echo "Need to run as root. Maybe use sudo..."
exit
fi
GET_IP_ADDRESS='/usr/local/bin/get-ip-address'
@samrocketman
samrocketman / inches_to_feet.cpp
Last active August 29, 2015 14:07
Inches to feet play
/*
* Sam Gleske
* Inches to feet
*/
#include <iostream>
using namespace std;
//global constants
float const INCHES_IN_FOOT = 12;
@samrocketman
samrocketman / reference.cpp
Created October 21, 2014 00:36
Value vs Reference
/*
* Sam Gleske
* Value vs Reference
*/
#include <iostream>
using namespace std;
int main(void)
{