Skip to content

Instantly share code, notes, and snippets.

View ajonescodes's full-sized avatar

Adam ajonescodes

  • VICI Sports
  • NYC
View GitHub Profile
@osy
osy / ToggleRemoteMode.ahk
Last active January 30, 2025 12:32
Apple Vision Pro + ROG Ally: Portable console gaming setup guide
; Place required files in the same directory as this script:
; - deviceinstaller64.exe from https://www.amyuni.com/downloads/usbmmidd_v2.zip
; - TurnOffHotspot.ps1 and TurnOnHotspot.ps1
#NoTrayIcon
Persistent
OnExit ExitFunc
MonitorLoadedFile := ".MonitorLoaded"
#y::
@snikch
snikch / gist:3661188
Created September 6, 2012 23:16
Find the current top view controller for your iOS application
- (UIViewController *)topViewController{
return [self topViewController:[UIApplication sharedApplication].keyWindow.rootViewController];
}
- (UIViewController *)topViewController:(UIViewController *)rootViewController
{
if (rootViewController.presentedViewController == nil) {
return rootViewController;
}
@crtr0
crtr0 / client.js
Created June 8, 2012 17:02
A simple example of setting-up dynamic "rooms" for socket.io clients to join
// set-up a connection between the client and the server
var socket = io.connect();
// let's assume that the client page, once rendered, knows what room it wants to join
var room = "abc123";
socket.on('connect', function() {
// Connected, let's sign-up for to receive messages for this room
socket.emit('room', room);
});