Skip to content

Instantly share code, notes, and snippets.

@cagartner
cagartner / deploy.sh
Last active May 6, 2024 20:09
Laravel Push deploy Github actions example
#!/bin/sh
set -e
vendor/bin/phpunit
(git push) || true
git checkout production
git merge master
@alexellis
alexellis / MULTIPASS_OPENFAAS.md
Last active December 5, 2022 03:39
Get k3s with OpenFaaS using k3sup and multipass

Get k3s with OpenFaaS using k3sup and multipass

multipass from Canoncial is like Docker Desktop, but for Ubuntu and works on MacOS, Linux and Windows.

Use-case:

We can get a Kubernetes cluster with k3s in a very short period of time. We can use this for workshops and building labs, and for R&D, including testing.

@helhum
helhum / FluidTemplate.html
Last active April 27, 2021 20:29
Focus area View Helper
<a href="#"
class="lazyload fullscreen random-gallery"
id="js-random-image"
data-random-images="{h:homePageTeaserImages(
images: object.images,
breakPointConfiguration: {
300: '{maxWidth: \'300\', maxHeight: \'300\'}',
1000: '{maxWidth: \'1000\', maxHeight: \'1000\'}',
1900: '{maxWidth: \'1900\', maxHeight: \'1900\'}'}
) -> f:format.htmlspecialchars()}"
@renoirb
renoirb / mw.js
Last active December 25, 2015 05:59
Piwik tracking code
// Refactor note, use mw.loader.using('mw.user',setupTracking);
/**
* Read address GET parameters and return value assigned to the key
*
* Credits: http://stackoverflow.com/questions/901115/how-can-i-get-query-string-values#answer-901144
**/
function getQueryParameterByName(name) {
name = name.replace(/[\[]/, "\\\[").replace(/[\]]/, "\\\]");
var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"),
@daKmoR
daKmoR / Example.html
Created October 14, 2011 14:05
GroupedForDateTimeViewHelper for Fluid
<div class="itemsListYearMonth">
<a:groupedForDateTime each="{items}" as="itemsByYear" groupBy="start" format="Y" groupKey="year">
<a:groupedForDateTime each="{itemsByYear}" as="itemsByMonth" groupBy="start" format="m" dateTimeKey="month">
<div class="yearMonth clearfix">
<div class="timeframe" data-behavior="FixTimeframe">
{month -> f:format.date(format: 'F Y')}
</div>
<f:for each="{itemsByMonth}" as="item">
<div class="item">
<p class="startEnd"><a:format.duration start="{item.start}" end="{item.end}" /></p>