Skip to content

Instantly share code, notes, and snippets.

View MaxLynam's full-sized avatar

Max MaxLynam

  • Melbourne, Victoria, Australia
View GitHub Profile
@MaxLynam
MaxLynam / pages_show_event.html
Created September 22, 2015 17:23
NationBuilder - Google Map Display on Event Template
//=====Can't get the venue name or address to come up in the Infowindow ... tried many different ways, just can't get it to output :(
<div id="map" style="width:100%; height:350px;"></div>
<script type='text/javascript'>//<![CDATA[
function initMap() {
var myLatLng = new google.maps.LatLng({{ page.event.venue_address.lat }}, {{ page.event.venue_address.lng }});
//=====Define View Options
var map = new google.maps.Map(document.getElementById('map'), {
zoom: 17,
center: myLatLng,
@MaxLynam
MaxLynam / gist:c59837b77d4609aea4fc
Created November 14, 2014 04:04
htaccess code sample . nice and efficient :)
# Force 'www.' on HTTP protocol
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteCond %{HTTP_HOST} !^$
RewriteCond %{HTTPS} !on
RewriteRule ^/?(.*) http://www.%{HTTP_HOST}/$1 [L,R,NE]
# Force 'www.' on HTTPS protocol
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteCond %{HTTP_HOST} !^$
RewriteCond %{HTTPS} on
@MaxLynam
MaxLynam / 0_reuse_code.js
Created August 19, 2014 22:26
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@MaxLynam
MaxLynam / flat-ui-icons.less
Created May 13, 2014 07:39
Flat UI Icons & Flat UI Social Icons
@font-face {
font-family: "Flat-UI-Icons";
src: url("../fonts/Flat-UI-Icons.eot");
src: url("../fonts/Flat-UI-Icons.eot?#iefix") format("embedded-opentype"), url("../fonts/Flat-UI-Icons.woff") format("woff"), url("../fonts/Flat-UI-Icons.ttf") format("truetype"), url("../fonts/Flat-UI-Icons.svg#Flat-UI-Icons") format("svg");
font-weight: normal;
font-style: normal;
}
/* Use the following CSS code if you want to use data attributes for inserting your icons */
@MaxLynam
MaxLynam / copy.txt
Created May 10, 2014 11:39
Copyright year for inline within Joomla content/module
&copy; 2006-<script>document.write(new Date().getFullYear())</script>
<!DOCTYPE html>
<html>
<head>
<title>Box Shadow</title>
<style>
.box {
height: 150px;
width: 300px;
margin: 20px;
@MaxLynam
MaxLynam / custom.css_before-closing-head
Created November 12, 2013 20:18
Add Custom CSS into Joomla Template - insert as last element before the closing /head tag .... as per code below.
<?php if (file_exists("<?php echo $this->baseurl ?>/templates/<?php echo $this->template; ?>/css/custom.css")); ?>
<link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template; ?>/css/custom.css" type="text/css" media="screen" />
<?php endif; ?>
</head>
@MaxLynam
MaxLynam / gist:6272059
Last active December 21, 2015 07:38
Replace ALL occurrences of a value THROUGHOUT an MySQL database. ..... .. . . . . . .. wow, dangerous. Doesn't work for you?? Don't blame me .... the awesome dude who did this originally is here: http://alexduggleby.com/2008/05/09/off-topic-t-sql-replace-all-occurrences-in-all-columns-in-all-tables/
------------------------------------------------------------
-- Name: STRING REPLACER
-- Author: ADUGGLEBY
-- Version: 20.05.2008 (1.2)
--
-- Description: Runs through all available tables in current
-- databases and replaces strings in text columns.
------------------------------------------------------------
-- PREPARE
@MaxLynam
MaxLynam / gist:6271946
Created August 19, 2013 17:44
Make Your Hero-unit and No-Number tabs work properly and standout note: nn_tabs has an issue with the js in that it can't be compressed or loaded in content, with other compressed script loading being delayed ... which can cause functionality issues. Haven't as yet brought this up with Pete as an ... but shall do when I remember.
.nn_tabs.outline_content > .tab-content .tab-pane {background-color: white;}
.nn_tabs > ul.nav-tabs > li {font-size: 1.6em; font-weight: bold;background-color: #EEEEEE;}
/*
.hero-unit, .nn_tabs, .module {
box-shadow: 0 0 20px 2px rgba(0, 0, 0, 0.1);
}
*/
.hero-unit, .nn_tabs {
@MaxLynam
MaxLynam / gist:6271895
Created August 19, 2013 17:40
Rs Forms RWD normalisation
.rsform .formControlLabel {
float: left;
width: 25%;
}
.rsform input, .rsform textarea, .rsform .uneditable-input {
margin-right: 4%;
width: 65%;
}