Skip to content

Instantly share code, notes, and snippets.

View drupix's full-sized avatar
🦧
They say I am unemployable!? Ah... but I don't care, I can eat bananas!!

drupix

🦧
They say I am unemployable!? Ah... but I don't care, I can eat bananas!!
View GitHub Profile
@MichaelCurrin
MichaelCurrin / README.md
Last active October 26, 2023 18:47
Jekyll - how to build a REST API

Jekyll - how to build a REST API

Serve your data as static JSON

How to make a read-only JSON REST API using Jekyll.

This doesn't need any Ruby plugins - you just use some built-in templating features in Jekyll 3 or 4.

You will end up with a single JSON file contains data for all pages on the site, and another JSON file of just posts. Alternatively, you can replace every HTML page and post with a JSON version.

@christophengelmayer
christophengelmayer / tailwind-resonsive-embed.html
Last active March 26, 2023 13:42
Tailwind CSS responsive Video embed
<div class="relative" style="padding-top: 56.25%">
<iframe class="absolute inset-0 w-full h-full" src="https://www.youtube-nocookie.com/embed/FMrtSHAAPhM" frameborder="0" …></iframe>
</div>
@mitchellshelton
mitchellshelton / FormTest.php
Last active October 21, 2018 15:52 — forked from AlexSkrypnyk/mymodule.css
Drupal 'add more' and 'remove single' AJAX buttons on multi value custom field using FormAPI. Converted to a D8 version, forked from https://github.com/alexdesignworks
<?php
/**
* @file
* Contains \Drupal\mymodule\Form\FormTest.
*/
namespace Drupal\mymodule\Form;
use Drupal\Core\Form\FormBase;
use Drupal\Core\Form\FormStateInterface;
@AlexSkrypnyk
AlexSkrypnyk / mymodule.css
Last active April 17, 2024 08:37
Drupal 'add more' and 'remove single' AJAX buttons on multi value custom field using FormAPI
input.form-submit.button-small {
padding: 4px 8px;
font-weight: bold;
}
.container-inline input.form-submit.button-small + .ajax-progress.ajax-progress-throbber .throbber {
position: absolute;
left: 19px;
margin-top: 7px;
}
@PurpleBooth
PurpleBooth / README-Template.md
Last active June 18, 2024 04:54
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@justinmc
justinmc / svgclass.js
Last active August 5, 2018 15:05 — forked from shshaw/svgclass.js
(function($){
/* addClass shim
****************************************************/
var addClass = $.fn.addClass;
$.fn.addClass = function(value) {
var orig = addClass.apply(this, arguments);
var elem,
i = 0,