Skip to content

Instantly share code, notes, and snippets.

View hughbris's full-sized avatar

Hugh Barnes hughbris

  • Reidston, New Zealand
  • 16:30 (UTC +12:00)
View GitHub Profile
@Baldinof
Baldinof / .dockerignore
Last active February 13, 2024 22:52
Single PHP FPM container with Caddy
/vendor
/docker
/Dockerfile
@rhukster
rhukster / watch.sh
Last active April 5, 2021 16:11
Watch script for wellington sassc wrapper
#!/bin/sh
#
# Configuration
#
# sass source
SASS_SOURCE_PATH="scss"
# sass options
@pwFoo
pwFoo / Caddyfile
Created December 12, 2016 21:32 — forked from talbergs/Caddyfile
Docker[ Caddy php7 ]
0.0.0.0:80
fastcgi / phpfmp:9000 php
@mrfolkblues
mrfolkblues / facebook-share-dialog-example.html
Last active April 9, 2022 07:59
Facebook Share Dialog Example: Using Javascript to define custom sharing parameters
<script>
// Include the Facebook Javascript SDK
window.fbAsyncInit = function() {
FB.init({
appId : 'your-app-id',
xfbml : true,
version : 'v2.8' // Update version as necessary
});
FB.AppEvents.logPageView();
};
@acamino
acamino / README.md
Last active July 21, 2024 06:20
Shortcuts to Improve Your Bash & Zsh Productivity

Shortcut — Action

  • CTRL + A — Move to the beginning of the line
  • CTRL + E — Move to the end of the line
  • CTRL + [left arrow] — Move one word backward (on some systems this is ALT + B)
  • CTRL + [right arrow] — Move one word forward (on some systems this is ALT + F)
  • CTRL + U — (bash) Clear the characters on the line before the current cursor position
  • CTRL + U —(zsh) If you're using the zsh, this will clear the entire line
  • CTRL + K — Clear the characters on the line after the current cursor position
  • ESC + [backspace] — Delete the word in front of the cursor
@Kelderic
Kelderic / custom_post_types.php
Last active August 8, 2023 13:39
This is set of helper classes to create and manage custom post types for WordPress. It gets added to a theme's logic folder, or libs or includes folders, and included in functions.php. Then the primary tracker class is initiated once, and used to create new CTPs.
<?php
/***********************************************************************/
/*************************** TRACKER CLASS ***************************/
/***********************************************************************/
if ( ! class_exists( 'Custom_Post_Types_Manager' ) ) {
class Custom_Post_Types_Manager {
@Joeltbond
Joeltbond / simple-menu.css
Created June 13, 2016 05:18
simple font-awesome hamburger menu
.hidden {
display: none;
}
@suzannealdrich
suzannealdrich / wget.txt
Last active December 11, 2023 15:12
wget spider cache warmer
wget --spider -o wget.log -e robots=off -r -l 5 -p -S --header="X-Bypass-Cache: 1" --limit-rate=124k www.example.com
# Options explained
# --spider: Crawl the site
# -o wget.log: Keep the log
# -e robots=off: Ignore robots.txt
# -r: specify recursive download
# -l 5: Depth to search. I.e 1 means 'crawl the homepages'.  2 means 'crawl the homepage and all pages it links to'...
# -p: get all images, etc. needed to display HTML page
# -S: print server response
@ostephens
ostephens / gist:7639249
Created November 25, 2013 10:16
Basic SPARQL query using a literal II
SELECT *
WHERE {
?subject ?predicate "Austen, Jane, 1775-1817"
}
LIMIT 10
@gka
gka / _readme.md
Created January 24, 2013 20:43
PHP Endpoint for Github Webhook URLs

PHP Endpoint for Github Webhook URLs

If you love deploying websites using Github, but for some reason want to use your own server, this script might be exactly what you need.

  1. Put github.php somewhere on your PHP-enabled web server, and make it accessible for the outside world. Let's say for now the script lives on http://example.com/github.php