Skip to content

Instantly share code, notes, and snippets.

View hectorddmx's full-sized avatar

Hector De Diego hectorddmx

View GitHub Profile
@hectorddmx
hectorddmx / All.swift
Created October 18, 2019 17:30
Custom UITextfield with picker
//: A UIKit based Playground for presenting user interface
import UIKit
import PlaygroundSupport
class CustomTextField: UITextField {
weak var presenter: UIViewController!
override func becomeFirstResponder() -> Bool {
@hectorddmx
hectorddmx / All.swift
Created October 18, 2019 17:30
Custom UITextfield with picker
//: A UIKit based Playground for presenting user interface
import UIKit
import PlaygroundSupport
class CustomTextField: UITextField {
weak var presenter: UIViewController!
override func becomeFirstResponder() -> Bool {
@hectorddmx
hectorddmx / fix_cocoapods_catalina.sh
Last active October 25, 2023 16:39
Remove homebrew cocoapods installation in catalina, and install directly from gem, zsh version
#! /bin/zsh
install_cocoapods () {
echo "Installing cocoapods with gem"
# Creating new gems home if it doesnt't exist
if [ ! -d "$HOME/.gem" ]; then
mkdir "$HOME/.gem"
fi
# Adding to current session
javascript: (function () {
const demoClasses = document.querySelectorAll('.taskboard-row-summary');
demoClasses.forEach(element => {
element.classList.toggle('hidden');
});
}());
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
mr Marathi
bs Bosnian
ee_TG Ewe (Togo)
ms Malay
kam_KE Kamba (Kenya)
mt Maltese
ha Hausa
es_HN Spanish (Honduras)
ml_IN Malayalam (India)
ro_MD Romanian (Moldova)
@hectorddmx
hectorddmx / list_voices.sh
Created February 5, 2019 23:53
Listar las voces de macOS
say -v \? | while read LINE
do
SPEAKER=$(echo $LINE | egrep -o "^[a-zA-Z\-]*[ ]?[A-Z][a-z]+")
TEXT=$(echo $LINE | egrep -o "#.*" | tr "#" " ")
echo $SPEAKER
echo -ne "This is voice $SPEAKER speaking the example text: \n" $TEXT | say -v $SPEAKER
done
@hectorddmx
hectorddmx / .gitignore
Created October 8, 2018 05:03
Global Gitignore macOS
# Mac OS X hidden files
.DS_Store
# Node
npm-debug.log
# WebStorm
.idea/
@hectorddmx
hectorddmx / command.sh
Created September 21, 2018 21:34
Get AppData for running iOS Simulator
xcrun simctl get_app_container booted [BUNDLE_INDENTIFIER] data
@hectorddmx
hectorddmx / README.md
Last active September 14, 2018 19:23 — forked from guilhermearaujo/README.md
OCLint integration with Xcode

OCLint (0.13) integration with Xcode

1. Integration

  • Add a new Target of kind Aggregate, name it OCLint
  • Under Builde Phases, add a new Run Script Phase
  • Paste the script

2. Usage

  • Select target OCLint
  • Build the target (press ⌘+B)
@hectorddmx
hectorddmx / textField.regex
Created July 26, 2018 20:01
Regex to find UITextFieldDelegates
(UITextFieldDelegate)+\s*\n?\{