Skip to content

Instantly share code, notes, and snippets.


Kevin Kirchner kevnk

  • Springfield MO
View GitHub Profile
lennardv2 / 1. Building PHP-MAMP on Apple Silicon
Last active Jul 16, 2021
Native PHP development / MAMP stack on Apple silicon M1
View 1. Building PHP-MAMP on Apple Silicon

Building the MAMP stack (php, apache & mysql) on Apple Silicon ARM (native)

In this tutorial, we'll build the the nescessary packages for ARM via homebrew. After that we'll configure apache2 for using virtual hosts. The native php is ofcourse way faster, see the results of this benchmark below.

Rosetta2 191.654 sec 1.96 MOp/s
Intel i7-4790K (imac 2014) 156.791 sec 2.39 MOp/s
Intel i5-8500B (mini 2018) 141.381 sec 2.65 MOp/s
ARM m1 43.745 sec 8.58 MOp/s
argyleink / easings.css
Created Feb 26, 2018
Handy CSS properties for easing functions
View easings.css
:root {
--ease-in-quad: cubic-bezier(0.55, 0.085, 0.68, 0.53);
--ease-in-cubic: cubic-bezier(0.55, 0.055, 0.675, 0.19);
--ease-in-quart: cubic-bezier(0.895, 0.03, 0.685, 0.22);
--ease-in-quint: cubic-bezier(0.755, 0.05, 0.855, 0.06);
--ease-in-expo: cubic-bezier(0.95, 0.05, 0.795, 0.035);
--ease-in-circ: cubic-bezier(0.6, 0.04, 0.98, 0.335);
--ease-out-quad: cubic-bezier(0.25, 0.46, 0.45, 0.94);
--ease-out-cubic: cubic-bezier(0.215, 0.61, 0.355, 1);
--ease-out-quart: cubic-bezier(0.165, 0.84, 0.44, 1);
View Color.php
class Color
* Convert a hex color to RGB.
* @param string $hex #BADA55
* @return array [186, 218, 85]
devudit / Helper.php
Created May 6, 2016
Dynamic body classes in laravel
View Helper.php
// Create A class Helper as app/Helper/Helper.php
use Illuminate\Support\Facades\Request;
Class Helper {
public static function getBodyClass() {
$body_classes = [ ];
$class = "";
basham /
Last active Jul 27, 2021
CSS Units Best Practices

CSS units

Recommendations of unit types per media type:

Media Recommended Occasional use Infrequent use Not recommended
Screen em, rem, % px ch, ex, vw, vh, vmin, vmax cm, mm, in, pt, pc
Print em, rem, % cm, mm, in, pt, pc ch, ex px, vw, vh, vmin, vmax

Relative units

Relative units

kevnk / local.xml
Created Sep 19, 2013
Boilerplate Magento local.xml file
View local.xml
<?xml version="1.0"?>
* Magento
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE_AFL.txt.
* It is also available through the world-wide-web at this URL:
kevnk / Magento Frontend
Last active Dec 22, 2015
Snippets for a Magento front-end developer doing some repeated customizations not native to default theme.
View Magento Frontend


Add breadcrumbs

<reference name="breadcrumbs">
    <action method="addCrumb">
don1138 / font-stacks.css
Last active Jul 21, 2021
CSS Modern Font Stacks
View font-stacks.css
/* Modern Font Stacks */
/* System */
font-family: system, -apple-system, ".SFNSText-Regular", "San Francisco", "Roboto", "Segoe UI", "Helvetica Neue", "Lucida Grande", sans-serif;
/* Times New Roman-based serif */
font-family: Cambria, "Hoefler Text", Utopia, "Liberation Serif", "Nimbus Roman No9 L Regular", Times, "Times New Roman", serif;
/* A modern Georgia-based serif */
font-family: Constantia, "Lucida Bright", Lucidabright, "Lucida Serif", Lucida, "DejaVu Serif", "Bitstream Vera Serif", "Liberation Serif", Georgia, serif;
cobyism /
Last active Jul 28, 2021
Deploy to `gh-pages` from a `dist` folder on the master branch. Useful for use with [yeoman](

Deploying a subfolder to GitHub Pages

Sometimes you want to have a subdirectory on the master branch be the root directory of a repository’s gh-pages branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master branch alongside the rest of your code.

For the sake of this example, let’s pretend the subfolder containing your site is named dist.

Step 1

Remove the dist directory from the project’s .gitignore file (it’s ignored by default by Yeoman).

andrewrcollins / mix_tint_tone_shade.php
Last active Apr 11, 2021
Color Mixing, Tint, Tone, and Shade in PHP
View mix_tint_tone_shade.php
* mix
* @param mixed $color_1
* @param mixed $color_2
* @param mixed $weight
* @return void