Skip to content

Instantly share code, notes, and snippets.

View orlandoaleman's full-sized avatar
🎯
Focusing

Orlando Alemán orlandoaleman

🎯
Focusing
View GitHub Profile
@orlandoaleman
orlandoaleman / fix_safari_enabling_extensions.md
Last active August 5, 2022 14:21
Trick for enable extensions in Safari Browser 13/14 on macOS Catalina

"Safari detected that an app or service interfered with clicking" ("Safari ha detectado que una app o servicio ha interferido con el clic")

Recently I had a problem with macOS Catalina 10.15.6 that Safari did prevent enable extensions. After many retries, and browsing the Internet forums, I decided to try another way. And I finally found the solution:

With a text editor, for example, nano, edit the file Extensions.plist (ensure Safari is closed):

$ nano ~/Library/Containers/com.apple.Safari/Data/Library/Safari/AppExtensions/Extensions.plist

@orlandoaleman
orlandoaleman / Orlando.idekeybindings
Last active August 29, 2015 13:57
My Custom XCode 5 Keybindings (shortcuts for spanish keyboard)
<?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>Menu Key Bindings</key>
<dict>
<key>Key Bindings</key>
<array>
<dict>
<key>Action</key>
@orlandoaleman
orlandoaleman / OrlandoAleman-Objc.cfg
Last active December 18, 2015 01:39
My own code styling for Objective-C. To use with Uncrustify
#
# Uncrustify Configuration File
# File Created With UncrustifyX 0.4.3 (252)
#
# Alignment
# ---------
## Alignment
@orlandoaleman
orlandoaleman / Macros.h
Last active May 20, 2018 18:33 — forked from numo16/Macros.h
Useful XCode Macros from an iOS developerhttp://orlandoaleman.com
/*
Macros.h by Orlando Aleman Ortiz <orlando@orlandoaleman.com>
*/
#define ApplicationDelegate [[UIApplication sharedApplication] delegate]
#define Bundle [NSBundle mainBundle]
#define DATE_COMPONENTS NSYearCalendarUnit|NSMonthCalendarUnit|NSDayCalendarUnit
#define DateString [NSDateFormatter localizedStringFromDate:[NSDate date] dateStyle:NSDateFormatterShortStyle timeStyle:NSDateFormatterNoStyle]
#define FlushPool(p) [p drain]; p = [[NSAutoreleasePool alloc] init]
#define HexAlphaColor(c, a) [UIColor colorWithRed:((c>>16)&0xFF)/255.0 green:((c>>8)&0xFF)/255.0 blue:(c&0xFF)/255.0 alpha:a]
@orlandoaleman
orlandoaleman / plist2strings.sh
Created March 3, 2013 14:36
Extracts title and footer texts from Settings.bundle plists to your *.strings localized files. Usage: plist2strings.sh Settings.bundle/Root.plist Settings.bundle/es.lproj/Root.strings
#!/bin/sh
die () {
echo >&2 "$@"
exit 1
}
[ "$#" -eq 2 ] || die "2 arguments required, $# provided"
[ -e $1 ] || die "File \"$1\" does not exist"
--
-- New tab in Xcode without side panels
--
-- Based on `menu_click`, by Jacob Rus, September 2006
-- (http://hints.macworld.com/article.php?story=20060921045743404)
--
--
-- Accepts a list of form: `{"Finder", "View", "Arrange By", "Date"}`
-- Execute the specified menu item. In this case, assuming the Finder
-- is the active application, arranging the frontmost folder by date.
@orlandoaleman
orlandoaleman / closepanels.applescript
Last active December 12, 2015 01:49
Close all annoying lateral panels of Xcode 4.x (Utilities, Navigators, Debug Area & Document Outline)
--
-- Close all annoying lateral panels of Xcode 4.x
--
-- Based on `menu_click`, by Jacob Rus, September 2006
-- (http://hints.macworld.com/article.php?story=20060921045743404)
--
--
-- Accepts a list of form: `{"Finder", "View", "Arrange By", "Date"}`
-- Execute the specified menu item. In this case, assuming the Finder
-- is the active application, arranging the frontmost folder by date.