Skip to content

Instantly share code, notes, and snippets.

View growthUx's full-sized avatar

Victor growthUx

View GitHub Profile
@growthUx
growthUx / keybase.md
Created May 1, 2018 18:31
Keybase Auth

Keybase proof

I hereby claim:

  • I am growthux on github.
  • I am vrx (https://keybase.io/vrx) on keybase.
  • I have a public key ASAORVrqGn3hcmJQFeSlNTJ6j7S-NnCUXzjuvJ0xakPC3Ao

To claim this, I am signing this object:

@growthUx
growthUx / utmFormtoLead.js
Created October 10, 2015 07:21
Get UTM Parameters from the URL of marketing campaigns and post those parameters together with your lead form
// Grab the UTM parameters from the URL
// stackoverflow.com/questions/901115/how-can-i-get-query-string-values-in-javascript
function getParameterByName(name) {
name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]");
var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"),
results = regex.exec(location.search);
return results === null ? "" : decodeURIComponent(results[1].replace(/\+/g, " "));
}
// Inject UTM parameters into a hidden form field
/* CSS only solution to make Bootstrap Unresponsive
* makes .container 970px wide (default)
* translates col-sm-*, col-md-*, col-lg-* to col-xs-*
* translates col-sm-offset-*, col-md-offset-*, col-lg-offset-* to col-xs-offset-*
* unhides .hidden-xs, .hidden-sm, .visible-xs[-*] and .visible-sm[-*] (new in 3.2.0)
* makes navbar unresponsive
* unlike Javascript overrides, preserves original .col-xs-* columns when toggled off
* All you have to do is add link this CSS file and the class unresponsive to the <body> tag.
*/
/**
* Use em or rem font-size in Bootstrap 3
*/
@font-size-root: 14px;
@font-unit: 0rem; // Pick em or rem here
// Convert all variables to em

Contract Killer

The popular open-source contract for web designers and developers by Stuff & Nonsense

  • Originally published: 23/12/2008
  • Revised date: 15/12/2013
  • Original post

@growthUx
growthUx / footer.tpl
Created August 8, 2014 06:31
Footer example using the BC Menu system
@growthUx
growthUx / main-nav.tpl
Last active August 29, 2015 14:05
Main Navigation Example on Bootstrap 3.x
<div id="main-nav" class="navbar navbar-default navbar-static">
<div class="navbar-header">
<button class="navbar-toggle" type="button" data-toggle="collapse" data-target=".js-navbar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
<div class="container">
@growthUx
growthUx / event-list.tpl
Created August 4, 2014 19:23
BC: MomentJS placed into the list layout of the web app module
<div id="eventList{tag_counter}" style="display:block" class="row list">
<div class="col-md-3"><img alt="" src="{tag_photo_value}" /></div>
<div class="col-md-9">
<h5>{tag_name}</h5>
<p style="margin-top: 4px;line-height: 1.7">
<i class="fa fa-thumb-tack"> </i> <strong>{tag_location}</strong><br />
<i class="fa fa-map-marker"> </i> {tag_address1}
{tag_addresscity} {tag_addressstate} {tag_addresszipcode}<br />
<span id="eventDate{tag_counter}" name="event{tag_counter}" value="{tag_display ongoing}">
<i class="fa fa-calendar-o"> </i>
@growthUx
growthUx / fc3.tpl
Created August 4, 2014 19:18
BC: FullCalendarJS script on the web page where the calendar is embedded
<script>
$(document).ready(function() {
$('#calendar').fullCalendar({
header: {
left: 'title',
center: '',
right: 'today prev,next'
},
editable: true,
events: [
@growthUx
growthUx / fc2.tpl
Last active August 29, 2015 14:04
BC: Template file that creates the JSON data pulled from the web app module
{
title: "{tag_name_nolink}",
url: "{tag_itemurl_nolink}",
start: "{tag_start}"
},