Skip to content

Instantly share code, notes, and snippets.

View admench's full-sized avatar
🔬
Testing

Adam Menczykowski admench

🔬
Testing
View GitHub Profile
@octocat
octocat / .gitignore
Created February 27, 2014 19:38
Some common .gitignore configurations
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #
@tommymarshall
tommymarshall / routes.php
Last active October 18, 2019 13:23
Simple Laravel + Craft integration
<?php
/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the Closure to execute when that URI is requested.
@rachelandrew
rachelandrew / Perch Template - Recipe
Last active August 29, 2015 14:04
Perch template: Recipe with schema.org microdata
<div vocab="http://schema.org/" typeof="Recipe">
<h1 property="name"><perch:content id="title" type="text" label="Recipe title" required="true" /></h1>
<p>By <span property="author"><perch:content id="author" type="text" label="Author" required="true" /></span>,
<meta property="datePublished" content="<perch:content id="date" type="date" label="Published date" format="Y-m-d" />"><perch:content id="date" type="date" label="Published date" format="F j, Y" /></p>
<img property="image" src="<perch:content type="image" label="Image" id="Image" width="800" />" alt="<perch:content id="alt" type="text" label="Image description" />" />
<div property="description"><perch:content id="description" type="textarea" label="Description" size="s" markdown="true" editor="markitup" required="true" /></div>
<p>Prep Time: <meta property="prepTime" content="PT<perch:content id="preptime" type="text" label="Prep time" required="true" help="Add the preparation time as a number in minutes" size="s" />M" /><perch:content i
@idleberg
idleberg / Install-Mcrypt.md
Last active September 2, 2024 06:59
Install Mcrypt on macOS

Setup php-mcrypt on macOS (and versions of Mac OS X)

These steps should have been mentioned in the prerequisites of the Laravel Installation Guide, since I'm surely not the only person trying to get Laravel running on macOS.

Install

Install Mcrypt using Homebrew and PECL (comes with PHP)

# PHP 7.3
@zakxxi
zakxxi / gist:1372d21f028ce6c38e88
Created September 24, 2014 14:50
HTML Elements
<p>
Below is just about every <abbr title="HyperText Markup Language">HTML</abbr> element you might want to use in your blog posts. Check the source code to see the many embedded elements within paragraphs.
</p>
<h1>
Heading 1
</h1>
<h2>
Heading 2
</h2>
<h3>
@Jiert
Jiert / JavaScript-Tabs.js
Last active November 29, 2023 11:40
Creating Tabs with Vanilla JavaScript
<!DOCTYPE html>
<html lang="en">
<head>
<title>Tabs</title>
<style>
.nav .active a { color: red; }
.tab-pane { display: none; }
.tab-pane.active { display: block; }
</style>
</head>
@chrismdp
chrismdp / s3.sh
Last active September 13, 2024 12:53
Uploading to S3 in 18 lines of Shell (used to upload builds for http://soltrader.net)
# You don't need Fog in Ruby or some other library to upload to S3 -- shell works perfectly fine
# This is how I upload my new Sol Trader builds (http://soltrader.net)
# Based on a modified script from here: http://tmont.com/blargh/2014/1/uploading-to-s3-in-bash
S3KEY="my aws key"
S3SECRET="my aws secret" # pass these in
function putS3
{
path=$1
@certainlyakey
certainlyakey / macros.twig
Last active May 31, 2018 11:02
Craft CMS - display categories related to an entry macro
{# usage: {{ siteMacros.related_categories( entry, true, 'rubrics', 'rubric-list', 'Рубрики:', '?news=true' ) }} #}
{# in main layout: {% import '_partials/macros' as siteMacros %} #}
{% macro related_categories(entryModel, isSection=false, catGroupName='categories', className='categories', headingText='', appendToURL='') %}
{% set categories = craft.categories.group(catGroupName).relatedTo(entryModel) %}
{% if categories | length %}
{% if isSection %}
<section class="{{ className }}">
<h1>{{headingText}}</h1>
// Vanilla version of FitVids
// Still licencened under WTFPL
//
// Not as robust and fault tolerant as the jQuery version.
// It's BYOCSS.
// And also, I don't support this at all whatsoever.
;(function(window, document, undefined) {
'use strict';
let webpack = require('webpack');
let path = require('path');
module.exports = {
entry: {
app: './resources/assets/js/app.js',
vendor: ['vue', 'axios']
},
output: {