Skip to content

Instantly share code, notes, and snippets.

View shealan's full-sized avatar
👋

Shealan Forshaw shealan

👋
View GitHub Profile
@shealan
shealan / policy.txt
Last active October 15, 2015 18:47
"All Files" Public Bucket Policy
{
"Version": "2008-10-17",
"Statement": [
{
"Sid": "AllowPublicRead",
"Effect": "Allow",
"Principal": {
"AWS": "*"
},
"Action": "s3:GetObject",
@shealan
shealan / embed.html
Last active October 15, 2015 18:53
How to embed dates into your website.
<div id="gigs"></div>
<script>
$(document).ready(function() {
$('#gigs').beatnode({
username: 'myname',
dates: 'MMM Do, YYYY',
template: '#gigs-template'
});
});
{% set month = 'May' %}
{% set startDate = now | date_modify('first day of ' ~ qFilter) %}
{% set endDate = now | date_modify('last day of ' ~ qFilter) %}
{% paginate craft.entries.section('events').eventShowtime('and, >= startDate, < endDate') as entries %}
return $user->profile->page_{$service};
// I need to make the table column I return dynamic. This doesn't work. What is the solution?
@shealan
shealan / example.css
Last active October 26, 2016 11:21
Reorder Divi Checkerboard Panels on Mobile
/* add this block of code to the theme options > custom styles area */
/* add class "pnpd-swap-mobile-order" to checkerboard rows you wish to reorder on mobile */
@media only screen and (max-width: 980px) {
.pnpd-swap-mobile-order {
box-sizing: border-box;
display: -webkit-box;
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
@shealan
shealan / gulpfile.js
Last active November 11, 2016 01:19
Gulp workflow with sass compile, js minification and postcss processing.
/* gulp dependencies */
const gulp = require('gulp');
const sass = require('gulp-sass');
const uglify = require('gulp-uglify');
const rename = require('gulp-rename');
const notify = require('gulp-notify');
const minifycss = require('gulp-minify-css');
const concat = require('gulp-concat');
const plumber = require('gulp-plumber');
const browserSync = require('browser-sync');
server {
listen 80 default_server;
listen [::]:80 default_server;
root /your/root/path;
index index.html;
server_name website.com;
<template>
<button :disabled="loading" :type="type" :class="{ 'opacity-50': loading }" class="transition text-white py-2 px-3 text-sm font-semibold rounded focus:outline-none"><fa v-if="icon" :icon="icon" class="mr-2"/>{{ text }} <fa v-if="loading" class="ml-2" icon="sync-alt" spin/></button>
</template>
<script>
export default {
props: {
type: {
type: String,
default: 'button'