Skip to content

Instantly share code, notes, and snippets.

View goblindegook's full-sized avatar
🎱
Ask again later.

Luís Rodrigues goblindegook

🎱
Ask again later.
View GitHub Profile
@goblindegook
goblindegook / secure-oembed.php
Created February 17, 2014 19:22
WordPress plugin to fix oEmbed over HTTPS for services not embedding the correct schema (e.g. YouTube).
<?php
/*
Plugin Name: Secure oEmbed
Plugin URI: https://gist.github.com/goblindegook/9057159
Description: Ensure oEmbed over HTTPS.
Version: 1.0
Author: Luís Rodrigues
License: GPL 3.0
*/
@goblindegook
goblindegook / admin-bar-sort-sites.php
Last active August 29, 2015 14:10
WordPress: Sort user sites by name in the Admin Bar
<?php
/**
* Sorts user sites by name in the Admin Bar.
*
* @param object $wp_admin_bar Admin Bar instance.
*/
function goblindegook_admin_bar_sort_sites( &$wp_admin_bar ) {
if ( ! is_user_logged_in() ) {
return;

Keybase proof

I hereby claim:

  • I am goblindegook on github.
  • I am goblindegook (https://keybase.io/goblindegook) on keybase.
  • I have a public key whose fingerprint is 4730 B887 139C 555A 90D4 B316 813B A29F 1792 5500

To claim this, I am signing this object:

@goblindegook
goblindegook / .screenrc
Created February 25, 2012 02:01
.screenrc
startup_message off
screen -t top 0 htop
screen -t bash 1
screen -t bash 2
screen -t bash 3
screen -t bash 4
screen -t bash 5
screen -t bash 6
screen -t bash 7
screen -t log 8
@goblindegook
goblindegook / HelvetiPaperG.taskpapertheme
Created February 25, 2012 20:19
HelvetiPaperG TaskPaper Theme
<theme>
<!-- color -->
<color id="foreground" red="1.0" green=".2" blue=".2" alpha="1.0" />
<color id="background" red="1" green="1" blue="1" alpha="1.0" />
<color id="done" red=".8" green=".8" blue=".8" alpha="1.0" />
<color id="groupHeader" extendsColorID="foreground" />
<color id="handle" extendsColorID="foreground" />
<color id="insertionPoint" red=".4" green=".4" blue=".4" alpha="1.0" />
<color id="note" red=".5" green=".5" blue=".5" alpha="1.0" />
<color id="project" extendsColorID="foreground" />
@goblindegook
goblindegook / addObserver.m
Created December 2, 2012 21:18
Detect VoiceOver Status Changes
- (void)viewDidLoad {
...
[[NSNotificationCenter defaultCenter]
addObserver:self
selector:@selector(didChangeVoiceOverStatus:)
name:UIAccessibilityVoiceOverStatusChanged
object:nil];
...
}
@goblindegook
goblindegook / goblindegook.css
Created December 5, 2012 18:02
Personal Marked theme.
/*
This document has been created with Marked.app <http://markedapp.com>, Copyright 2011 Brett Terpstra
Please leave this notice in place, along with any additional credits below.
---------------------------------------------------------------
Title: goblindegook
Author: Luís Rodrigues <https://github.com/goblindegook>
Description: Personal Marked theme.
*/
body
@goblindegook
goblindegook / scroll-to.js
Last active February 20, 2016 19:18
Animated vertical scroll, no jQuery
'use strict';
/**
* Create requestAnimationFrame() polyfill function.
*
* Creates a requestAnimationFrame()-compatible function based on setTimeout().
*
* @param {Number} fps Frames per second (defaults to 60).
* @return {Function} requestAnimationFrame() polyfill.
*/
@goblindegook
goblindegook / codeship_restart_last_build.py
Created March 3, 2016 18:21
Restart the last Codeship build for a project
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Usage:
#
# $ CODESHIP_API_KEY={your api key} CODESHIP_PROJECT_ID={project id} ./rebuild.py
import os
import json
import urllib2
@goblindegook
goblindegook / demo.html
Created August 25, 2010 16:19
Select box auto-width workaround for Internet Explorer (requires jQuery)
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Select auto-width workaround for Internet Explorer</title>
<link rel="stylesheet" type="text/css" href="select-autowidth.css" title="Select Autowidth" />
<script src="http://code.jquery.com/jquery-1.4.2.min.js" type="text/javascript"></script>