Skip to content

Instantly share code, notes, and snippets.

View roborourke's full-sized avatar
🤠

Robert O'Rourke roborourke

🤠
View GitHub Profile
@deterralba
deterralba / Dockerfile
Created August 23, 2017 14:14
Start traefik with docker backend in circleCI 2.0 (after setup_remote_docker)
# Docker file used for traefik in CircleCI
FROM traefik
# Necessary because CircleCI use a tcp endpoint and not the unix socket.
# It requires certificats for TLS, and because CircleCI use docker machine,
# mounting a volume doesn't work.
# NB circle-cert needs to contain $DOCKER_CERT_PATH, see README.md
COPY circle-cert /cert
# if you used to share other volumes, you need to copy them now or with `docker cp`
@shadyvb
shadyvb / scoped-cache.php
Last active September 19, 2016 13:13
WordPress Scoped Cache helper
<?php
/**
* WordPress Scoped Cache Helper
*
* This addresses the problem of obsolete cached data for an object after it is updated.
*
* Sometimes we need to cache specific bits of data related to a certain object, and keep the cached data in sync
* with the object's state. This helper makes it easier to tap into object update process to clear ( and optionally
* rebuild ) the cache.
*
@kucrut
kucrut / bridge-walker-nav-menu.php
Last active September 19, 2022 15:38
WordPress Nav Menu walker that returns menu items as multidimensional array (items will children)
<?php
/**
* Nav menu walker
*/
class Bridge_Walker_Nav_Menu extends Walker_Nav_Menu {
/**
* Prepare item
*
@shadyvb
shadyvb / .gitconfig
Created May 24, 2016 15:13
Git Aliases
[alias]
# Merge the current branch to another one, created back when I needed to merge into three branches before issuing a PR
merge-to = "!f() { git checkout $1 && git merge $2 && git checkout $2; }; f"
# Commit shorthand family:
c = commit
cm = commit -m
cam = commit -am
camp = "!f() { git commit -am \"$1\"; git push; }; f"
ca = commit -a
@jsdf
jsdf / setupTestFramework.js
Created November 5, 2015 09:27
Make React PropType warnings throw errors in Jasmine/Jest
var util = require('util');
// nobody cares about warnings so lets make them errors
// keep a reference to the original console methods
var consoleWarn = console.warn;
var consoleError = console.error;
function logToError() {
throw new Error(util.format.apply(this, arguments).replace(/^Error: (?:Warning: )?/, ''));
<?php
/**
* Plugin Name: (WCM) Backbone/Underscore template loader
* Description: Loads Underscore (or other) templates using the WP Dependency API
*/
/**
* @author Franz Josef Kaiser http://unserkaiser.com/
* @link http://chat.stackexchange.com/transcript/message/19439060#19439060
*/
@thomasfr
thomasfr / Git push deployment in 7 easy steps.md
Last active April 2, 2024 14:57
7 easy steps to automated git push deployments. With small and configurable bash only post-receive hook
@ramv
ramv / kirby.conf
Created March 6, 2014 23:49
Kirby NGINX configuration
##############################
## Kirby configuration
##############################
location /kirby/ {
include /etc/nginx/mime.types;
index index.php;
root /var/www/addons88/;
if (!-e $request_filename){
@konklone
konklone / ssl.rules
Last active August 8, 2023 08:39
nginx TLS / SSL configuration options for konklone.com
# Basically the nginx configuration I use at konklone.com.
# I check it using https://www.ssllabs.com/ssltest/analyze.html?d=konklone.com
#
# To provide feedback, please tweet at @konklone or email eric@konklone.com.
# Comments on gists don't notify the author.
#
# Thanks to WubTheCaptain (https://wubthecaptain.eu) for his help and ciphersuites.
# Thanks to Ilya Grigorik (https://www.igvita.com) for constant inspiration.
server {
@mlconnor
mlconnor / oembed_endpoints.js
Created April 24, 2013 12:45
List of oEmbed endpoints found here http://api.embed.ly/1/services
[{"regex": ["http://*youtube.com/watch*", "http://*.youtube.com/v/*", "https://*youtube.com/watch*", "https://*.youtube.com/v/*", "http://youtu.be/*", "http://*.youtube.com/user/*", "http://*.youtube.com/*#*/*", "http://m.youtube.com/watch*", "http://m.youtube.com/index*", "http://*.youtube.com/profile*", "http://*.youtube.com/view_play_list*", "http://*.youtube.com/playlist*"], "about": "YouTube is the world's most popular online video community, allowing millions of people to discover, watch and share originally-created videos. YouTube provides a forum for people to connect, inform, and inspire others across the globe and acts as a distribution platform for original content creators and advertisers large and small.", "displayname": "YouTube", "name": "youtube", "domain": "youtube.com", "subdomains": ["m.youtube.com"], "favicon": "http://c2548752.cdn.cloudfiles.rackspacecloud.com/youtube.ico", "type": "video"}, {"regex": ["http://*twitch.tv/*", "http://*justin.tv/*/b/*", "http://*justin.tv/*/w/*"], "about":