Skip to content

Instantly share code, notes, and snippets.

@kols
kols / fallout-1-high-res-patch-mac-osx.md
Last active April 19, 2024 21:39 — forked from robatron/fallout-1-high-res-patch-mac-osx.md
How to get the Fallout 1 (and Fallout 2) high-resolution patch working for Mac OS X

Fallout 1 (and Fallout 2) Hi-Res Patch for Mac OS X

Fallout 1 was originally designed to run at 640x480 resolution. I wanted to run the Mac OS X version of Fallout on my MacBook 11", which has a 1366x768 display. There is a [high resolution patch][hi-res], but it only supports the Windows version of Fallout.

Turns out that the OS X version of Fallout runs through Wine, so we can get this patch working with just a few configuration changes:

Note for Fallout 2 users: The process for Fallout 2 is essentially the same, with a different patch, and some minor pathing differences. Other than that, the process is exactly the same!

Install Wine

@kols
kols / waitForKeyElements.js
Created January 13, 2023 10:32
waitForKeyElements.js
/**
* A utility function for userscripts that detects and handles AJAXed content.
*
* @example
* waitForKeyElements("div.comments", (element) => {
* element.innerHTML = "This text inserted by waitForKeyElements().";
* });
*
* waitForKeyElements(() => {
* const iframe = document.querySelector('iframe');
@kols
kols / dim_wishlist.txt
Last active April 20, 2022 09:53
DIM wishlist
title: my wishlist
description: my wishlist
// silicon nuroma (adept)
dimwishlist:item=1387987271&perks=839105230,2420895100,3400784728,2896038713
dimwishlist:item=1387987271&perks=3250034553,1561002382,957782887,47981717
@kols
kols / chnroutes.yml
Created August 4, 2015 15:45
ansible chnroutes ipset with bestroutetb
---
- name: generate chnroutes
shell: >
bestroutetb -p custom --rule-format=$'%prefix/%length\n' --group-header=$'---%name-start\n' --group-footer=$'---%name-end\n' --group-gateway -s -f -o /tmp/chnroutes.txt
&& sed -i '' -e '/---vpn-start/,/---vpn-end/d' -e '/^---/d' /tmp/chnroutes.txt
delegate_to: localhost
- name: upload chnroutes.txt
copy: src=/tmp/chnroutes.txt dest=/opt/scripts/chnroutes.txt
register: uploaded
@kols
kols / index.coffee
Created July 11, 2013 15:08
upyun node.js lib concept
request = require "request"
url = require 'url'
fs = require 'fs'
path = require 'path'
crypto = require 'crypto'
UPYUN_API_HOSTS =
AUTO: "v0.api.upyun.com"
TELECOM: "v1.api.upyun.com"
NETCOM: "v2.api.upyun.com"
@kols
kols / ejabberd.plist
Last active December 16, 2015 05:09
launchd.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyL
ist-1.0.dtd">
<plist version="1.0">
<dict>
<key>Disabled</key>
<true/>
<key>KeepAlive</key>
<dict>
<key>SuccessfulExit</key>
@kols
kols / distance.py
Last active December 14, 2015 18:49
Distance calculation
import math
EARTH_RADIUS = 6378137. # in meters
def calculate_distance(lat1, lng1, lat2, lng2):
if not all((lat1, lng1, lat2, lng2)):
return
a = math.radians(lat1) - math.radians(lat2)
@kols
kols / compress.py
Created December 11, 2012 04:20
Compress and upload image using PIL and fabric
import argparse
import os
import sys
from PIL import Image
OUTPUT_DIR = 'output'
OUTPUT_SIZE = (3000, 1500)
@kols
kols / django_ext.py
Created September 14, 2012 06:37
ipython django extension
"""If we're working with a Django project, set up the environment
"""
import os
def load_ipython_extension(ipython):
try:
import django
except ImportError:
return
@kols
kols / conv_hexstr.rb
Created June 26, 2012 18:22
Convert hex string to ruby string
#!/usr/bin/env ruby
def convert_hexstr(str, start=0, index=nil)
index ||= str.length
hexstr = str[start, index]
ar = []
hexstr.scan(/\\x../).each do |s|
ar << s.gsub('\\', '0').to_i(16)
end
ar.empty? ? str : ar.pack('C*').force_encoding('utf-8')