Skip to content

Instantly share code, notes, and snippets.

View hugocf's full-sized avatar

Hugo Ferreira hugocf

View GitHub Profile
#!/usr/bin/env bash
# Get mouse coordinates with: cliclick p
readonly catalogue=88,382
readonly kind=326,388
readonly kind_location=329,582
readonly first_location=505,478
readonly three_dots=1338,218
readonly unregister_entity=1273,271
readonly delete_entity=474,809
@hugocf
hugocf / ParseMarkdownLinks.m
Last active August 13, 2022 18:07
Regex to parse inline Markdown links in Objective-C
@hugocf
hugocf / bash.sh
Last active February 21, 2021 23:01
Moved to ➔ https://github.com/hugocf/scripts/blob/master/templates/bash.sh — Template for interactive bash scripts: supports command line options with values; prompts for any missing parameters/arguments.
#!/usr/bin/env bash
# Created by Hugo Ferreira <hugo@ferreira.cc> on isoD
# Licensed under the MIT License: https://opensource.org/licenses/MIT
set -u # treat unset variables as errors
readonly BASEDIR=$(cd "$(dirname "$0")" && pwd) # where the script is located
readonly CALLDIR=$(pwd) # where it was called from
readonly SUCCESS=0 # exit status of bash commands
@hugocf
hugocf / choose-site-to-run-expected.txt
Created September 17, 2019 12:39
Choose site to run based on a list of fixed site codes
❌ Error for site 'site1' because filter is 'gibberish'
✅ Testing site 'site1' because filter is ''
✅ Testing site 'site1' because filter is 'site1'
🙈 Skipping site 'site1' because filter is 'site2'
🙈 Skipping site 'site1' because filter is 'site3'
🙈 Skipping site 'site1' because filter is 'site4'
❌ Error for site 'site2' because filter is 'gibberish'
✅ Testing site 'site2' because filter is ''
🙈 Skipping site 'site2' because filter is 'site1'
@hugocf
hugocf / keybase.md
Created May 14, 2017 12:34
Keybase prove of github account

Keybase proof

I hereby claim:

  • I am hugocf on github.
  • I am hugocf (https://keybase.io/hugocf) on keybase.
  • I have a public key ASCIB_fbfp4kz1MT0dwBgpScL-2FHITn-IBFvztOc9e4sQo

To claim this, I am signing this object:

<?php
/*
Plugin Name: Custom Functionality Plugin
Description: Custom functionality specific for this site, regardless of the theme used.
Version: 1.0
Author: Example
Author URI: http://example.com
*/
@hugocf
hugocf / java-update-4.diff
Created June 30, 2011 19:13
Changes made by the "Java for Mac OS X 10.6 Update 4 Developer Package Download"
macbookpro$ pwd
/System/Library/Frameworks/JavaVM.framework/Versions
macbookpro$ diff -r A.old/ A/
diff -r A.old/CodeResources A/CodeResources
9c9
< QCrcIQC/TlfpkL7+QEydYU6A+SE=
---
> mOoqFgfAGTAdgmn6uiOoeIQ2zC8=
13c13
@hugocf
hugocf / Inspiration.txt
Created May 12, 2009 19:30
Fetches a quote line from a file, according to the current day of the year. Permits retrieving only the "citation" or the "author" part, assuming a line in the format: citation - author
"Infinite patience yields immediate results..." - Ancient proverb
"Do, or do not. There is no 'try'." - Yoda
"It's the job that's never started as takes longest to finish" - Samwise Gamgee
"There's no speed limit!" - Derek Sivers
@hugocf
hugocf / httpd-vhosts.conf
Last active August 29, 2015 13:55
Dynamic local “.dev” site mapping for Apache & WordPress
#
# Use name-based virtual hosting.
#
NameVirtualHost *:80
#
# Dynamic virtual hosting
#
# http://some.example.dev => /Users/username/Sites/example
<VirtualHost *:80>