Skip to content

Instantly share code, notes, and snippets.

View roborourke's full-sized avatar
🤠

Robert O'Rourke roborourke

🤠
View GitHub Profile
@thomasfr
thomasfr / Git push deployment in 7 easy steps.md
Last active May 1, 2024 23:17
7 easy steps to automated git push deployments. With small and configurable bash only post-receive hook
@luetkemj
luetkemj / wp-query-ref.php
Last active April 25, 2024 09:37
WP: Query $args
// This gist is now maintained on github at https://github.com/luetkemj/wp-query-ref
<?php
/**
* WordPress Query Comprehensive Reference
* Compiled by luetkemj - luetkemj.github.io
*
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query#Parameters
* Source: https://core.trac.wordpress.org/browser/tags/4.9.4/src/wp-includes/query.php
*/
@kylebarrow
kylebarrow / example.html
Created June 23, 2011 06:30
Prevent links in standalone web apps opening Mobile Safari
<!DOCTYPE html>
<head>
<title>Stay Standalone</title>
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<script src="stay_standalone.js" type="text/javascript"></script>
</head>
<body>
<ul>
<li><a href="http://google.com/">Remote Link (Google)</a></li>
@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 {
@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
@Fab1en
Fab1en / custom_media_menu.js
Created January 21, 2013 15:32
Draft plugin example to add a javascript menu into the WP3.5 Media Library popup. Answer to this Wordpress stackexchange question : http://wordpress.stackexchange.com/questions/76980/add-a-menu-item-to-wordpress-3-5-media-manager/
// for debug : trace every event
/*var originalTrigger = wp.media.view.MediaFrame.Post.prototype.trigger;
wp.media.view.MediaFrame.Post.prototype.trigger = function(){
console.log('Event Triggered:', arguments);
originalTrigger.apply(this, Array.prototype.slice.call(arguments));
}*/
// custom state : this controller contains your application logic
wp.media.controller.Custom = wp.media.controller.State.extend({
@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`
@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: )?/, ''));
@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){