Skip to content

Instantly share code, notes, and snippets.

Avatar

Phil Wolstenholme philwolstenholme

View GitHub Profile
@philwolstenholme
philwolstenholme / bookmarklet
Created Apr 24, 2015
Lorem ipsum bookmarklet
View bookmarklet
javascript:(function()%7Bvar%20lorem%20%3D%20'Lorem%20ipsum%20dolor%20sit%20amet%2C%20consectetur%20adipiscing%20elit%2C%20sed%20do%20eiusmod%20tempor%20incididunt%20ut%20labore%20et%20dolore%20magna%20aliqua.%20Ut%20enim%20ad%20minim%20veniam%2C%20quis%20nostrud%20exercitation%20ullamco%20laboris%20nisi%20ut%20aliquip%20ex%20ea%20commodo%20consequat.%20Duis%20aute%20irure%20dolor%20in%20reprehenderit%20in%20voluptate%20velit%20esse%20cillum%20dolore%20eu%20fugiat%20nulla%20pariatur.%20Excepteur%20sint%20occaecat%20cupidatat%20non%20proident%2C%20sunt%20in%20culpa%20qui%20officia%20deserunt%20mollit%20anim%20id%20est%20laborum'%3BjQuery(document.activeElement).val(lorem)%7D)()
View gist:bebd63911db7011a7a1b
// ==UserScript==
// @name Extended Jira timestamps
// @namespace https://wolstenhol.me
// @version 0.1
// @author Phil Wolstenholme
// @match https://jira.ctidigital.com/*
// @grant none
// @downloadURL https://gist.githubusercontent.com/philwolstenholme/bebd63911db7011a7a1b/raw/ce8bde9d87d97377789e4d123f66461eed52848b/gistfile1.js
// @updateURL https://gist.githubusercontent.com/philwolstenholme/bebd63911db7011a7a1b/raw/ce8bde9d87d97377789e4d123f66461eed52848b/gistfile1.js
// ==/UserScript==
@philwolstenholme
philwolstenholme / gist:203c586fdfd99169c3c4
Created Apr 26, 2015
Add a theme-color meta tag to your Drupal site (within your theme's template.php)
View gist:203c586fdfd99169c3c4
/*
* Implements template_preprocess_html()
* Preprocess variables for the html template file.
*
*/
function YOUR_THEME_NAME_preprocess_html(&$variables) {
$android5_theme_color = array(
'#type' => 'html_tag',
'#tag' => 'meta',
'#attributes' => array(
@philwolstenholme
philwolstenholme / StupidJira.js
Last active Oct 28, 2015 — forked from mikebell/StupidJira.js
Adds an input to the Jira operations toolbar which contains a git command to create a new branch
View StupidJira.js
// ==UserScript==
// @name StupidJira
// @namespace http://mikebell.io
// @version 0.1
// @description Add branch details
// @match https://jira.ctidigital.com/browse/*
// @grant none
//allow pasting
// ==/UserScript==
View SassMeister-input-HTML.html
<div class="container">
<div class="box">Kinda works</div>
</div>
<div class="container">
<div class="box">Shame the gutter is applied with padding rather than a margin though</div>
</div>
View Suresh's clever breakout class
/*
Credit to https://github.com/bsuresh, I'm just saving this as a gist for my own reference
*/
/* Content to extend beyond the boundaries of our container and span
to full width of viewport */
.u-breakout {
margin-left: calc(-50vw + 50%);
margin-right: calc(-50vw + 50%);
clear: both;
View d8_details.md
View index.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
<title>Countdown</title>
<meta name="author" content="">
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<script src="//code.jquery.com/jquery.js"></script>
View views-page-title.php
<?php
/**
* Implements hook_views_post_render().
*/
function MODULE_NAME_views_post_render($view) {
if ($view->id() !== 'VIEW_ID' && $view->getDisplay()->getPluginId() !== 'page') {
return;
}
@philwolstenholme
philwolstenholme / gist:18bc65971a57f6956d67
Created Aug 3, 2014
IRCC request to pause a Sony smart TV
View gist:18bc65971a57f6956d67
<?xml version="1.0"?>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<s:Body>
<u:X_SendIRCC xmlns:u="urn:schemas-sony-com:service:IRCC:1">
<IRCCCode>AAAAAgAAAJcAAAAZAw==</IRCCCode>
</u:X_SendIRCC>
</s:Body>
</s:Envelope>