Skip to content

Instantly share code, notes, and snippets.

View davidhellmann's full-sized avatar
🤔
Focusing

David Hellmann davidhellmann

🤔
Focusing
View GitHub Profile
@Chrisedmo
Chrisedmo / Craft3ValetDriver.php
Created February 1, 2017 10:29
Craft 3 Composer Install Valet Driver
<?php
class Craft3ValetDriver extends ValetDriver
/* https://github.com/laravel/valet/blob/master/cli/drivers/CraftValetDriver.php */
{
/**
* Determine if the driver serves the request.
*
* @param string $sitePath
* @param string $siteName
@bendc
bendc / easing.css
Created September 23, 2016 04:12
Easing CSS variables
:root {
--ease-in-quad: cubic-bezier(.55, .085, .68, .53);
--ease-in-cubic: cubic-bezier(.550, .055, .675, .19);
--ease-in-quart: cubic-bezier(.895, .03, .685, .22);
--ease-in-quint: cubic-bezier(.755, .05, .855, .06);
--ease-in-expo: cubic-bezier(.95, .05, .795, .035);
--ease-in-circ: cubic-bezier(.6, .04, .98, .335);
--ease-out-quad: cubic-bezier(.25, .46, .45, .94);
--ease-out-cubic: cubic-bezier(.215, .61, .355, 1);
@gisu
gisu / Multienvironment Worpdress.txt
Last active December 20, 2015 12:00
Multienvironment Worpdress
Include a directory in your Theme folder with the name `wp-config` and include here the File for your Environment.
@MatthewCallis
MatthewCallis / zones.coffee
Created December 15, 2015 20:17
ISO Language Codes, ISO Country Codes, Time Zones
values =
locale_country_code: [
{ title: "Andorra", value: "AD" },
{ title: "United Arab Emirates", value: "AE" },
{ title: "Afghanistan", value: "AF" },
{ title: "Antigua and Barbuda", value: "AG" },
{ title: "Anguilla", value: "AI" },
{ title: "Albania", value: "AL" },
{ title: "Armenia", value: "AM" },
{ title: "Angola", value: "AO" },
@MichaelMackus
MichaelMackus / IncludeRawExtension.php
Created July 22, 2015 00:34
Include raw twig template
<?php
class IncludeRawExtension extends \Twig_Extension
{
public function getFunctions()
{
return [
new \Twig_SimpleFunction(
'includeRaw',
[$this, 'includeRaw'],
function updateheight(){
_.parents('.slick-list').height(_.parents('.chapters_slide.slick-active').height());
}
$(".featured-slider-nav").each(function(index) {
$(this).click(function() {
_ = $(this);
@paulirish
paulirish / bling.js
Last active May 1, 2024 19:56
bling dot js
/* bling.js */
window.$ = document.querySelectorAll.bind(document);
Node.prototype.on = window.on = function (name, fn) {
this.addEventListener(name, fn);
}
NodeList.prototype.__proto__ = Array.prototype;
@flesler
flesler / index.html
Last active September 11, 2021 13:16
Anchor navigation powered by jquery.scrollTo
<!-- Include jQuery from somewhere, must use version 1.8 or above -->
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
<!-- Include latest jquery.scrollTo, can download from https://github.com/flesler/jquery.scrollTo/releases -->
<script type="text/javascript" src="//cdn.jsdelivr.net/jquery.scrollto/2.1.2/jquery.scrollTo.min.js"></script>
<!-- Initialize the plugin, the contents of the script can be inlined here, of course -->
<script type="text/javascript" src="js/init.js"></script>
@neilgee
neilgee / acf-first-row.php
Last active September 17, 2021 18:20
ACF Repeater - Grab First/LAst or Random Single Data Row
<?php
//My ACF Fields for reference
//testimonials - field group
//testimonial - sub-field
//testimonial_header - sub-field
//First Repeater Row in Array
$rows = get_field( 'testimonials', 348 );// grab all rows from page ID
/**
* Smart Append Selectors
*
* @param {string} $name - Name of the Tag
* @param {string|bool} $mod - Name of the modifier
* @param {bool} $context - For nested selector
* @param {string} $name - Name from the Tag
*/
@mixin append($tag, $mod: false, $context: false) {