Skip to content

Instantly share code, notes, and snippets.

View modemlooper's full-sized avatar
🏠
Working from home

mödemlooper modemlooper

🏠
Working from home
View GitHub Profile
@modemlooper
modemlooper / studio-migrate-db-compatibility.php
Created September 20, 2026 19:09
WordPress Studio Migrate DB compatibility
<?php
/**
* Plugin Name: SQLite RENAME TABLE support
* Description: Implements MySQL `RENAME TABLE a TO b[, c TO d]` for the SQLite Database Integration driver, which does not support it (WP Migrate DB Pro relies on it when finalizing a migration).
* Version: 1.0.0
*/
defined( 'ABSPATH' ) || exit;
add_filter( 'query', 'sqlite_rename_table_filter', 1 );
@modemlooper
modemlooper / studio-multisite-fix.php
Created September 20, 2026 19:06
WordPress Studio Mulitsite Fix
<?php
/**
* Plugin Name: Multisite Subdirectory Router (Studio)
* Description: WordPress Studio's native PHP router only mirrors the single-site .htaccess. This replicates the subdirectory-multisite rewrite rules so /site/wp-admin/, /site/wp-login.php and /site/wp-content/... work. Delete this file to remove.
* Version: 1.0.0
*/
defined( 'ABSPATH' ) || exit;
if ( ! is_multisite() || ( defined( 'SUBDOMAIN_INSTALL' ) && SUBDOMAIN_INSTALL ) ) {
@modemlooper
modemlooper / skill.md
Last active August 28, 2026 18:29
symlink Xcode skills into claude skills
name sync-xcode-skills
description Sync the xcode-skills symlinks in .claude/skills/ with the source folder at ~/xcode-skills — adds symlinks for new skill folders, removes symlinks whose source no longer exists. Use whenever the user asks to sync, update, refresh, or re-link xcode-skills, or mentions adding/removing skills from that source folder.

Sync xcode-skills

The skills under .claude/skills/ for this project include symlinks pointing into ~/xcode-skills/<skill-name>/. Editing files inside an existing skill folder needs no sync — the symlink already reflects live content. Sync is only needed when a skill folder is

@modemlooper
modemlooper / swift
Created December 28, 2025 16:34
List iOS bundle files
// Print the actual path of the Bundle
let bundlePath = Bundle.main.bundlePath
print("📂 Bundle Path: \(bundlePath)")
do {
// List everything at the root of the bundle
let items = try FileManager.default.contentsOfDirectory(atPath: bundlePath)
print("--------------------------------------------------")
print("Items found in Bundle Root:")
@modemlooper
modemlooper / iframe.php
Last active November 5, 2025 14:54
Dynamic iframe
<?php
/**
* 1. Add custom query variables to make them publicly available.
*/
function appp_query_vars( $vars ) {
// Variable name changed to 'id'
$vars[] = 'id';
return $vars;
}
@modemlooper
modemlooper / disable-mcp.php
Created October 17, 2025 16:27
disable Events Calendar Pro AI mcp
add_filter( 'tec_common_ai_mcp_is_active', '__return_false' );
@modemlooper
modemlooper / stretchy.swift
Created September 17, 2025 20:56
swiftui stretchy header
import SwiftUI
/// A reusable SwiftUI view that features a stretchy header positioned below a navigation bar.
///
/// This view is generic and accepts two custom view builders ("slots"):
/// - `header`: The content to display in the stretchy header area.
/// - `content`: The main scrollable content to display below the header.
struct ReusableStretchyHeaderView<HeaderContent: View, MainContent: View>: View {
// MARK: Properties
@modemlooper
modemlooper / gist:4d73a5eae9e76d91b9538ff37d416b52
Created January 29, 2024 14:41
Remove BuddyPress no component pages notice
/**
* Remove BP pages nag.
*
* @return void
*/
function appp_remove_bp_pages_notices() {
$notices = buddypress()->admin->notices;
foreach ( $notices as $key => $notice ) {
--
format_version: '11'
default_step_lib_source: https://github.com/bitrise-io/bitrise-steplib.git
project_type: ionic
workflows:
Deploy_Android:
steps:
- activate-ssh-key@4:
run_if: '{{getenv "SSH_RSA_PRIVATE_KEY" | ne ""}}'
- git-clone@8.1: {}
@modemlooper
modemlooper / index.html
Created August 18, 2023 14:49
phaser test
<html>
<head>
<title>Gamefroot Arcade</title>
<style>
body, html {
margin: 0;
padding: 0;
background: black;
overflow: hidden;
}