Skip to content

Instantly share code, notes, and snippets.

@TemporaryJam
TemporaryJam / RandomLogo.class.js
Last active January 3, 2016 08:08
Random logo rotator
/*
---
script: RandomLogo.class.js
description: Cycles through a collection of available logos in a given container. Obviously there should be more
available logos than there are logos displayed at only one time
requires:
- Core
- More/Fx.Tween
@TemporaryJam
TemporaryJam / Gluster (Glusterfs) setup and install
Last active March 10, 2016 20:54
Gluster (Glusterfs) setup and install
#http://www.gluster.org
#nathan's notes https://gist.github.com/f58f3aa963f2165a0caa
#install gluster repo
wget -P /etc/yum.repos.d http://download.gluster.org/pub/gluster/glusterfs/LATEST/EPEL.repo/glusterfs-epel.repo
#create brick directory
[root@re-sw-cen-web1 ~]# mkdir -p /gluster/var-www-html
#install client & server software
@TemporaryJam
TemporaryJam / Remove BOM linux
Created September 29, 2013 12:55
How to remove the byte order mark (BOM) from a file on Linux CLI
tail --bytes=+4 text.txt > text_no_bom.txt
https://stackoverflow.com/questions/38194032/how-to-update-ruby-version-2-0-0-to-the-latest-version-in-mac-osx-yosemite#
$ brew update
$ brew install rbenv ruby-build
$ rbenv init
rbenv install --list
rbenv install 2.4.4
rbenv global 2.4.4
rbenv rehash
@TemporaryJam
TemporaryJam / radios-and-checkboxes.html
Created May 16, 2019 23:24
Accessible custom styled radios and checkboxes - 100% CSS IE10+
<!DOCTYPE html>
<head>
<title>A11y radios</title>
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
<link href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN" crossorigin="anonymous">
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<style>
.section input[type="radio"],
.section input[type="checkbox"]{
@TemporaryJam
TemporaryJam / extension_end_script.patch
Last active June 3, 2019 03:41
Stop ExpressionEngine nested hook calls from failing when using the end_script flag in a nested call.
From 2c06ccd60184aeb56e13692b42559247c552265a Mon Sep 17 00:00:00 2001
Date: Fri, 4 May 2018 16:19:02 +1000
Subject: [PATCH] Patching EE extension bug where a nested call to extensions
and use of end_script will exit all currently running hooks instead of just
the current one
---
public/system/ee/legacy/libraries/Extensions.php | 33 +++++++++++++++++++++---
1 file changed, 29 insertions(+), 4 deletions(-)
@TemporaryJam
TemporaryJam / forms.js
Last active June 3, 2019 03:42
Get comma separated list of forms from FormAssembly
names = $('.form-name');
ids = $('.slds-text-heading--label');
mod = $('.slds-grid + .slds-text-body--small');
//Add <pre id="target"></pre> near top of page
$('#target').text('');
for (var i = 0; i < names.length; i++) {
$('#target').text($('#target').text() + $(names[i]).text().trim() + ', ' + $(ids[i]).text().trim() + ', ' + $(mod[i]).text().trim() + '\n');
}
@TemporaryJam
TemporaryJam / detect-click-outside.js
Created July 21, 2015 06:17
Detect a click outside of an element
$(document).click(function(event) {
if(!$(event.target).closest('#id-of-thing-youre-detecting-the-click-outside-of').length) {
//close something or do something
}
});
<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
xmlns:admin="http://webns.net/mvcb/"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title><![CDATA[ACER Discover]]></title>
<link>https://www.acer.org/discover</link>
@TemporaryJam
TemporaryJam / Install AMQP for PHP
Last active June 17, 2021 10:19
How to install the PHP AMQP library
#install cmake
yum install cmake
#install libtool
yum install libtool
#install a perl pkgconfig requirement
yum install perl-ExtUtils-PkgConfig.noarch
#get rabbitmq-c library