Skip to content

Instantly share code, notes, and snippets.

Avatar

Hugo Ferreira hugocf

View GitHub Profile
@hugocf
hugocf / choose-site-to-run-expected.txt
Created Sep 17, 2019
Choose site to run based on a list of fixed site codes
View choose-site-to-run-expected.txt
❌ 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
Keybase prove of github account
View keybase.md

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:

@hugocf
hugocf / ParseMarkdownLinks.m
Last active Jul 20, 2016
Regex to parse inline Markdown links in Objective-C
View ParseMarkdownLinks.m
@hugocf
hugocf / httpd-vhosts.conf
Last active Aug 29, 2015
Dynamic local “.dev” site mapping for Apache & WordPress
View httpd-vhosts.conf
#
# Use name-based virtual hosting.
#
NameVirtualHost *:80
#
# Dynamic virtual hosting
#
# http://some.example.dev => /Users/username/Sites/example
<VirtualHost *:80>
@hugocf
hugocf / bash.sh
Last active Feb 21, 2021
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.
View bash.sh
#!/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
View custom-functionality-plugin.php
<?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 Jun 30, 2011
Changes made by the "Java for Mac OS X 10.6 Update 4 Developer Package Download"
View java-update-4.diff
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
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
View Inspiration.txt
"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