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 / 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;
}
@modemlooper
modemlooper / gist:bf9a180b151ed0320c7e005246b73489
Created April 6, 2023 18:00
Load WordPress media from prod NGINX
location ~* ^.+\.(svg|svgz|jpg|jpeg|gif|png|ico|bmp)$ {
try_files $uri @image_fallback;
}
location @image_fallback {
proxy_pass http://{PROD};
}
@modemlooper
modemlooper / fake.js
Created October 30, 2022 15:53
Fake async await
async function fakeasync() {
const waitFor = delay => new Promise(resolve => setTimeout(resolve, delay));
await waitFor(3000);
}
@modemlooper
modemlooper / cors.php
Created June 14, 2022 00:17
allow cors wp-api
/**
* Allow cross domain api access from iOS and Android
*
* @param WP_Rest_Request $request
* @return void
*/
function appp_init_cors( $request ) {
$origin_url = '*';
header( 'Access-Control-Allow-Origin: ' . $origin_url );