Skip to content

Instantly share code, notes, and snippets.

View jensfranke's full-sized avatar
💛

Jens Franke jensfranke

💛
View GitHub Profile
@KatieMFritz
KatieMFritz / craft3-ax.md
Last active November 15, 2019 14:13
Craft 3 plugins for author experience

Craft 3 plugins for better author experience

Annotated Notes: For admin notes with automatic timestamps.

Control Panel Body Classes: Add body classes to various Control Panel screens for easier styling (in combination with Control Panel CSS).

Control Panel CSS: To make style tweaks to the control panel. See web/cp.css for styles.

Control Panel Nav: Custom navigation menus for each user type, for easier navigation.

@stursby
stursby / README.md
Last active May 13, 2022 07:41
Vue + Firebase + Auth Demo

Vue + Firebase + Auth Demo

A simple App using Vue.js & Firebase with Auth.

See the DEMO.

@ivi-admin
ivi-admin / Kirby CMS nginx config for Laravel Forge
Last active May 13, 2018 19:00
Adds the removal of the trailing slash, Kirby config lines and panel redirection. Don't change the SSL certificate lines from what is auto-generated by Forge!
# FORGE CONFIG (DOT NOT REMOVE!)
include forge-conf/www.domain.com/before/*;
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name www.domain.com;
root /home/forge/www.domain.com/;
# FORGE SSL (DO NOT REMOVE!)
@williamgomes
williamgomes / craft:config:general.php
Last active June 30, 2023 12:20
how to configure nginx with craft (also multilingual)
<?php
/**
* General Configuration
*
* All of your system's general configuration settings go in here.
* You can see a list of the default settings in craft/app/etc/config/defaults/general.php
*/
return array(
@paulirish
paulirish / what-forces-layout.md
Last active April 26, 2024 17:33
What forces layout/reflow. The comprehensive list.

What forces layout / reflow

All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.

Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.

Element APIs

Getting box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent
@BenMorel
BenMorel / viewport-units-ios.scss
Last active March 11, 2022 13:15
SCSS mixin to support vh and vw units on all iOS Safari versions. Based on an idea by Patrick Burtchaell's: https://gist.github.com/pburtchaell/e702f441ba9b3f76f587
/**
* Fix for vw, vh, vmin, vmax on iOS 7.
* http://caniuse.com/#feat=viewport-units
*
* This fix works by replacing viewport units with px values on known screen sizes.
*
* iPhone 6 and 6 Plus cannot run iOS 7, so are not targeted by this fix.
* Target devices running iOS 8+ will incidentally execute the media query,
* but this will still produce the expected result; so this is not a problem.
@mbecher
mbecher / figure.php
Last active August 1, 2019 11:33
getkirby tags/figure.php with srcset and thumbnail creation
<?php
kirbytext::$tags['figure'] = array(
'attr' => array(
'width',
'height',
'alt',
'text',
'title',
'class',
@cletusw
cletusw / .eslintrc
Last active February 29, 2024 20:24
ESLint Reset - A starter .eslintrc file that resets all rules to off and includes a description of what each rule does. From here, enable the rules that you care about by changing the 0 to a 1 or 2. 1 means warning (will not affect exit code) and 2 means error (will affect exit code).
{
// http://eslint.org/docs/rules/
"ecmaFeatures": {
"binaryLiterals": false, // enable binary literals
"blockBindings": false, // enable let and const (aka block bindings)
"defaultParams": false, // enable default function parameters
"forOf": false, // enable for-of loops
"generators": false, // enable generators
"objectLiteralComputedProperties": false, // enable computed object literal property names
@daniellevass
daniellevass / 0_hierarchical_apps.md
Last active August 19, 2017 23:40
Hierarchical Apple Watch Apps

#Hierarchical Apple Watch Apps

##Introduction

Now we've got our project set up we can start to write some code! Today we're going to take a look at creating a heirarchical Apple Watch App using tables and segues.

###1. Storyboard

Firstly, we're going to start by removing whatever we had on our app interface. We then want to drag out a Table from the UI object items - this should automtically create you a "row" and a "group". The row is like a UITableCell in a UITableVIew, however the group will hold all the UI items for us. Next, we want to drag out a Label on to our table - I positioned mine to go horizontally and vertically central.

@bastianallgeier
bastianallgeier / nginx
Last active November 30, 2023 10:14
nginx setup
# block content
location ~ ^/content/(.*).(txt|md|mdown)$ {
rewrite ^/content/(.*).(txt|md|mdown)$ /error redirect;
}
# block all files in the site folder from being accessed directly
location ~ ^/site/(.*)$ {
rewrite ^/site/(.*)$ /error redirect;
}