Achieved with WINE. None of the online tutorials were sufficient so I created this.
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
require 'rubygems' | |
require 'mechanize' | |
if ARGV.size < 3 | |
puts %q{Usage: ruby xcode.rb USERNAME PASSWORD "DOWNLOAD_URL" [WGET_PARAMS]} | |
puts %q{Example: ruby xcode.rb myusername@apple.com 123456 "https://developer.apple.com/devcenter/download.action?path=/Developer_Tools/xcode_4_and_ios_sdk_4.3__final/xcode_4_and_ios_sdk_4.3__final.dmg" } | |
exit | |
end | |
a = Mechanize.new { |agent| |
static void dispatch_repeated_internal(dispatch_time_t firstPopTime, double intervalInSeconds, dispatch_queue_t queue, void(^work)(BOOL *stop)) | |
{ | |
__block BOOL shouldStop = NO; | |
dispatch_time_t nextPopTime = dispatch_time(firstPopTime, (int64_t)(intervalInSeconds * NSEC_PER_SEC)); | |
dispatch_after(nextPopTime, queue, ^{ | |
work(&shouldStop); | |
if(!shouldStop) | |
{ | |
dispatch_repeated_internal(nextPopTime, intervalInSeconds, queue, work); | |
} |
import Foundation | |
import Cocoa | |
class DestinationView: NSView { | |
var isHighlighed: Bool! = false | |
override func awakeFromNib() { | |
self.register(forDraggedTypes: [NSFilenamesPboardType]) | |
} | |
func isHighlighted() -> Bool! { |
#import "AppDelegate.h" | |
#import <MediaPlayer/MediaPlayer.h> | |
@implementation AppDelegate | |
{ | |
BOOL _isFullScreen; | |
} | |
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions | |
{ |
// | |
// Generated by class-dump 3.5 (64 bit). | |
// | |
// class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2015 by Steve Nygard. | |
// | |
#pragma mark Blocks | |
typedef void (^CDUnknownBlockType)(void); // return type and parameters are unknown |
#!/bin/bash | |
GFWLIST=https://autoproxy-gfwlist.googlecode.com/svn/trunk/gfwlist.txt | |
PROXY=127.0.0.1:7070 | |
cd `dirname "${BASH_SOURCE[0]}"` | |
echo "Downloading gfwlist from $GFWLIST" | |
curl "$GFWLIST" --socks5-hostname "$PROXY" > /tmp/gfwlist.txt | |
/usr/local/bin/gfwlist2pac \ | |
--input /tmp/gfwlist.txt \ |
@implementation UIImage (ResourceProxyHack) | |
+ (UIImage *)_iconForResourceProxy:(id)proxy format:(int)format { | |
// HACK: proxy seems garbage so we always show PDF for now. | |
let cgImage = [_bridge imageForFileType:@"pdf"]; | |
// HACK: We use mainScreen here but could have multiple screens. | |
let image = [UIImage imageWithCGImage:cgImage scale:UIScreen.mainScreen.scale orientation:UIImageOrientationUp]; | |
return image; | |
} |
import RPi.GPIO as GPIO | |
import time | |
out1 = 13 | |
out2 = 11 | |
out3 = 15 | |
out4 = 12 | |
i=0 | |
positive=0 |