Skip to content

Instantly share code, notes, and snippets.

View CameronGilroy's full-sized avatar

Cameron Gilroy CameronGilroy

View GitHub Profile

Keybase proof

I hereby claim:

  • I am camerongilroy on github.
  • I am camerongilroy (https://keybase.io/camerongilroy) on keybase.
  • I have a public key ASAmvTX7Fj9lAXMggxhX12sqbst8F2__GPwhfMeWVXSq_Qo

To claim this, I am signing this object:

@CameronGilroy
CameronGilroy / convert ts to mp4
Created June 3, 2014 05:25
Convert ts files from video stream to one mp4 video file
ls *.ts | awk 'BEGIN {print "ffconcat version 1.0"}{print "file " $1}' > segments.ffconcat
ffmpeg -i segments.ffconcat -bsf:a aac_adtstoasc -acodec copy -vcodec copy final.mp4
<a href="{{ shop.url }}">
<img
src="{{ 'logo.png' | asset_url }}"
alt="{{ shop.name }}"
data-retina-src="{{ 'logo.svg' | asset_url }}">
</a>
<script type="text/javascript">
Modernizr.addTest('retina', function () {
return (!!navigator.userAgent.match(/Macintosh|Mac|iPhone|iPad/i) && window.devicePixelRatio==2);
});

Typography

Headings

Headings from h1 through h6 are constructed with a # for each level:

# h1 Heading
## h2 Heading
### h3 Heading
# dd if=/dev/zero of=/swapfile bs=1024 count=1024000
# mkswap /swapfile
# swapon /swapfile
@CameronGilroy
CameronGilroy / groups-new.html
Last active December 19, 2015 11:19
The for for Creating Groups
<div class="container">
<h1>New group</h1>
<form action="/your_purchase_url" class="pin" method="post">
<div class="errors" style="display:none">
<h3></h3>
<ul></ul>
</div>
<fieldset>
<legend>Billing</legend>
@CameronGilroy
CameronGilroy / Log
Last active December 19, 2015 08:29
Pin is working now & the code has been updated - eWay is still giving some errors :( Trying to get Pin or eWay to work.
{"email":"codyfauser@gmail.com","ip":"10.0.0.1","description":"200 Web 2.0 M&Ms","address_line1":"42 Sevenoaks St","address_line2":"","address_city":"Perth","address_postcode":"6454","address_state":"WA","address_country":"Australia"}
{"params":{"error":"invalid_resource","error_description":"One or more parameters were missing or invalid.","messages":[{"param":"card.address_line1","code":"card_address_line1_invalid","message":"Card address line1 can't be blank"},{"param":"card.address_city","code":"card_address_city_invalid","message":"Card address city can't be blank"},{"param":"card.address_country","code":"card_address_country_invalid","message":"Card address country can't be blank"}]},"message":"One or more parameters were missing or invalid.","success":false,"test":true,"authorization":null,"fraud_review":null,"avs_result":{"code":null,"message":null,"street_match":null,"postal_match":null},"cvv_result":{"code":null,"message":null}}
Error: One or more parameters were missing or invalid.
@CameronGilroy
CameronGilroy / details.php
Last active December 18, 2015 04:29
Here is part of the code that I have written for the module
<?php defined('BASEPATH') or exit('No direct script access allowed');
/**
* This file is part of FireSale, a PHP based eCommerce system built for
* PyroCMS.
*
* Copyright (c) 2013 Moltin Ltd.
* http://github.com/firesale/firesale
*
* For the full copyright and license information, please view the LICENSE
@CameronGilroy
CameronGilroy / gist:5682300
Last active December 17, 2015 22:29
FireSale Sample 2
{{ firesale:products limit="24" category="2" order="created desc" }}
{{ if products }}
<div id="accordion" class="accordion">
{{ products }}
<div class="accordion-group">
<div class="accordion-heading"><a href="#collapse{{ id }}" class="accordion-toggle" data-toggle="collapse" data-parent="#accordion">{{ title }}</a></div>
<div id="collapse{{ id }}" class="accordion-body collapse">
<div class="accordion-inner">
<p>{{ description }}</p>
<input type="number" id="quanty_{{ id }}" value="1" />
@CameronGilroy
CameronGilroy / TPC FireSale Sample1
Last active December 17, 2015 11:39
FireSale Code Sample
{{ if products }}
{{ firesale:products limit="24" order="created desc" }}
<div class="accordion-group">
<div class="accordion-heading"><a href="#collapse{{ id }}" class="accordion-toggle" data-toggle="collapse" data-parent="#accordion">{{ title }}</a></div>
<div id="collapse{{ id }}" class="accordion-body collapse">
<div class="accordion-inner">
<p>{{ description }}</p>
<a href="{{ firesale:url route='cart' }}insert/{{ id }}/1" class="basket"><span class="icon"></span>Add to Cart</a>
</div>
</div>