Skip to content

Instantly share code, notes, and snippets.

@bradtraversy
bradtraversy / docker_wordpress.md
Last active July 21, 2024 05:00
Docker Compose FIle For Wordpress, MySQL & phpmyadmin

Wordpress & Docker

This file will setup Wordpress, MySQL & PHPMyAdmin with a single command. Add the code below to a file called "docker-compose.yaml" and run the command

$ docker-compose up -d

# To Tear Down
$ docker-compose down --volumes
@netzgestaltung
netzgestaltung / admin.js
Last active October 25, 2017 16:48 — forked from zerosignalproductions/admin.js
Insert an image into the wordpress editor always wrapped in a figure tag. The javascript is used to remove the figure element from the editor if the delete button is used. Editing alingnment left/right/center/none is supported.
(function($) {
$(document).ready(function() {
$('body').on('mousedown', 'div[aria-label="Remove"]', function(e) {
var editor = tinyMCE.activeEditor,
element = editor.selection.getNode();
if(element.tagName !== 'FIGURE') {
$(element).parents('figure').remove();
}
});
@cmbankester
cmbankester / homebrew.mxcl.nginx.plist
Last active April 29, 2022 14:08
NGINX startup on Mac OSX El Capitan
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>homebrew.mxcl.nginx</string>
<key>RunAtLoad</key>
<true/>
<key>KeepAlive</key>
<true/>
@juukie
juukie / _bootstrap-sass-xl.scss
Last active August 7, 2018 08:33
Add xl step to bootstrap sass. Should be after bootstrap.scss.
/* Place this after bootstrap.scss */
$screen-xl: 1560px !default;
$screen-xl-min: $screen-xl !default;
$screen-xl-desktop: $screen-xl-min !default;
$screen-lg-max: ($screen-xl-min - 1) !default;
$container-xlarge-desktop: (1530px + $grid-gutter-width) !default;
$container-xl: $container-xlarge-desktop !default;
.container {
@sim642
sim642 / DI.m3u
Created July 5, 2015 12:52
Digitally Imported premium streams
#EXTM3U
#EXTINF:-1,Digitally Imported - Ambient
http://pub1.diforfree.org:8000/di_ambient_hi
#EXTINF:-1,Digitally Imported - Big Room House
http://pub1.diforfree.org:8000/di_bigroomhouse_hi
#EXTINF:-1,Digitally Imported - Breaks
http://pub1.diforfree.org:8000/di_breaks_hi
//taphover - a solution to the lack of hover on touch devices.
//more info: http://www.hnldesign.nl/work/code/mouseover-hover-on-touch-devices-using-jquery/
$('a.taphover').on('touchstart', function (e) {
'use strict'; //satisfy the code inspectors
var link = $(this); //preselect the link
if (link.hasClass('hover')) {
//preventDefault and return false will cause any other touches on the element(s) to fail.
//to avoid this behavior data() will store the "href". so "href" can be restored.
link.attr("href", link.data("href"));
} else {
@carlesjove
carlesjove / custom_wp_gallery
Last active November 28, 2018 17:18
Custom gallery markup for WordPress. Put this un functions.php and it will override the default shortcode.
@joyrexus
joyrexus / README.md
Last active June 19, 2024 09:35 — forked from liamcurry/gist:2597326
Vanilla JS equivalents of jQuery methods

Sans jQuery

Events

// jQuery
$(document).ready(function() {
  // code
})
@pezz
pezz / renoise.md
Last active November 23, 2022 15:28
How to use Renoise on a system without f*#$ing it over and doing your head in
@trepmal
trepmal / editor_plugin.js
Created October 3, 2011 23:17
WordPress: TinyMCE button that wraps selection in given tag
// http://tinymce.moxiecode.com/wiki.php/API3:class.tinymce.Plugin
(function() {
tinymce.create('tinymce.plugins.WRAP', {
/**
* Initializes the plugin, this will be executed after the plugin has been created.
* This call is done before the editor instance has finished its initialization so use the onInit event
* of the editor instance to intercept that event.
*