Skip to content

Instantly share code, notes, and snippets.

View aladac's full-sized avatar

Adam Ladachowski aladac

View GitHub Profile

How to install game-porting-toolkit (aka proton for macOS)

You also might wanna just use Whisky which does this automatically

This guide works on macOS 13.4+ using Command Line Tools for XCode 15 Beta!

What is this?

In the recent WWDC, Apple announced and released the "game porting toolkit", which upon further inspection this is just a modified version of CrossOver's fork of wine which is a "compatibility layer" that allows you to run Windows applications on macOS and Linux.

class TimeoutHook
include Sidekiq::Middleware
SidekiqTimeout = Class.new(StandardError)
def call(job_instance, msg, _queue, &block)
start = Time.now.to_i
if job_instance.class.const_defined?('TIMEOUT')
Timeout.timeout(job_instance.class::TIMEOUT, &block)
@aladac
aladac / config.plist
Created July 22, 2022 09:20
OpenCore config.plist for Skylake, R7 260X
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>ACPI</key>
<dict>
<key>Add</key>
<array>
<dict>
<key>Comment</key>

Keybase proof

I hereby claim:

  • I am aladac on github.
  • I am aladac (https://keybase.io/aladac) on keybase.
  • I have a public key ASDxIk5h-wUYGyNCQdgvrocICxIjc9KlAcsCBC4v1I3lZwo

To claim this, I am signing this object:

Keybase proof

I hereby claim:

  • I am aladac on github.
  • I am aladac (https://keybase.io/aladac) on keybase.
  • I have a public key ASAxM4x8vNMMgZaAf-CDHfnZHpykvR6j63o-0wZh6uk_NQo

To claim this, I am signing this object:

@aladac
aladac / README.md
Last active August 19, 2020 12:05
Stock QPYS30.52-22-2 (Android 10) with Magisk v20.4 on XT1952-1

Installing Magisk on Moto G7 Play (XT-1952-1) Android 10 (QPYS30.52-22-2)

!!! DISCLAIMER !!!

IT'S ALL YOUR FAULT FROM THIS POINT ON !!!

IF YOU ARE UNSURE OF WHAT YOU ARE DOING, YOU CAN RENDER YOUR PHONE UNUSABLE !!!

Prerequisites

  • Moto G7 Play XT-1952-1 (buuuuut, I know that some firmware from XT-1952-4 works partially on my phone, sooooo it may work on other models too, probably worth using the bootloder.img and radio/modem files (NON-HLOS.bin, fsg.mbn) from your other model if you plan to try and install this on a model it wasn't intended for)

  • Firmware version QPYS30.52-22-2

@aladac
aladac / activesupport-concern.rb
Created December 5, 2018 11:16
Rails ActiveSupport Concern
module Sample
extend ActiveSupport::Concern
included do
scope :disabled, -> { where(disabled: true) }
end
class_methods do
...
end
@aladac
aladac / ruby-singleton.rb
Created December 5, 2018 11:14
Ruby Singleton
module Sample
class << self
def foobar
end
end
end
@aladac
aladac / noreferrer.js
Created October 28, 2014 11:32
What is the most reliable way to hide / spoof the referrer in JavaScript?
// Source: http://stackoverflow.com/questions/8893269/what-is-the-most-reliable-way-to-hide-spoof-the-referrer-in-javascript
var isWebkit = document.createElement("a");
isWebkit.style.cssText = "-webkit-border-radius:1px;";
isWebkit = isWebkit.style.cssText.indexOf("radius") !== -1;
if (isWebkit) {
function hideRefer(e) {
var a = e.target;
if (a && a.tagName !== 'A') a = a.parentNode;
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>URL</key>
<string>vnc://192.168.1.143</string>
</dict>
</plist>