Skip to content

Instantly share code, notes, and snippets.

View joshmiller83's full-sized avatar
🐢
Taking things one step at a time.

Josh Miller joshmiller83

🐢
Taking things one step at a time.
View GitHub Profile
<?php
use Behat\Mink\Driver\GoutteDriver;
use Behat\Mink\Exception\ElementNotFoundException;
use Behat\Mink\Exception\ExpectationException;
use Drupal\DrupalExtension\Context\RawDrupalContext;
use Behat\Behat\Context\SnippetAcceptingContext;
/**
* Defines application features from the specific context.
<?php
use Drupal\DrupalExtension\Context\RawDrupalContext;
use Behat\Mink\Exception\UnsupportedDriverActionException;
/**
* Big Pipe context.
*/
class BigPipeContext extends RawDrupalContext {
@daggerhart
daggerhart / mymodule.module.php
Last active August 4, 2020 05:55
Simple Drupal 7 hook_theme() and render array examples
<?php
/**
* Implements hook_theme()
* @return array
*/
function mymodule_theme(){
$items = array();
$items['mymodule_custom_template'] = array(
@seancdavis
seancdavis / index.html
Created March 3, 2016 21:00
Full-Size, Looping Background Video with YouTube Video
<style>
.bg-video {
position: fixed;
top: 0;
left: 0;
width: 100vw;
height: 100vh;
overflow: hidden;
z-index: -1;
}
@martinsik
martinsik / chat-frontend.js
Last active December 19, 2023 10:23
Node.js chat frontend and server
$(function () {
"use strict";
// for better performance - to avoid searching in DOM
var content = $('#content');
var input = $('#input');
var status = $('#status');
// my color assigned by the server
var myColor = false;
@cmalven
cmalven / index.html
Last active April 27, 2024 10:17
Shortest (useful) HTML5 Document
<!-- http://www.brucelawson.co.uk/2010/a-minimal-html5-document/ -->
<!doctype html>
<html lang=en>
<head>
<meta charset=utf-8>
<title>blah</title>
</head>
<body>
<p>I'm the content</p>