Skip to content

Instantly share code, notes, and snippets.

@leonardomdornelas
leonardomdornelas / Fastfile.rb
Created July 10, 2023 14:49
Lane :build_ipa
lane :build_ipa do
#Forcing Xcode stable version to prevent using beta
xcode_select("/Applications/Xcode.app")
# Build and archive the application
gym(
export_method: "app-store",
configuration: "Release",
scheme: scheme,
clean: true,
@leonardomdornelas
leonardomdornelas / editor-not-manage-admin-user.php
Created June 10, 2013 02:54
Prevent the Editor from accessing the "admin" user.php and user-edit.php pages. #wordpress
<?php
add_action( 'admin_init', 'stop_access_admin_profile' );
function stop_access_admin_profile() {
global $pagenow;
if (isset($_REQUEST['user_id'])) {
$user_id = $_REQUEST['user_id'];
} else if (isset($_REQUEST['user'])) {
$user_id = $_REQUEST['user'];
} else {