Skip to content

Instantly share code, notes, and snippets.

View dsingleton's full-sized avatar

David Singleton dsingleton

View GitHub Profile
@dsingleton
dsingleton / messenger-launcher-override.css
Created January 29, 2023 19:05
How to hack the position of the Launcher for the Intercom Messenger
.intercom-lightweight-app .intercom-lightweight-app-launcher,
#intercom-container div:has(> iframe[name="intercom-launcher-frame"]) {
bottom: 80px;
}
@dsingleton
dsingleton / Gemfile
Last active July 22, 2020 22:25 — forked from boffbowsh/Gemfile
source "https://rubygems.org"
{
"neighborhood": "Fitzrovia",
"restaurants": [
{
"id": "63460",
"name": "Burrito Kitchen",
"image": "https://f.roocdn.com/images/menus/25785/header-image.jpg?width=360&height=200&auto=webp&format=jpg&fit=crop&v=1477308353",
"url": "https://deliveroo.co.uk/menu/london/bank/burrito-kitchen-cheapside",
"price": 2,
"tags": [
@dsingleton
dsingleton / ExampleComponent.jsx
Last active February 10, 2018 22:53
Next.js and CSS Modules
import React from 'react';
import PropTypes from 'prop-types';
import styles from './styles.scss';
export default function Banner({ title, message }) {
return (
<div className={styles.banner}>
{title && <h3 className={styles.title}>{title}</h3>}
<p className={styles.message}>{message}</p>
</div>
@dsingleton
dsingleton / function-bind.js
Created October 25, 2011 11:10
Polyfill for Function.prototype.bind
Function.prototype.bind=Function.prototype.bind||function(b){if(typeof this!=="function"){throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable");}var a=Array.prototype.slice,f=a.call(arguments,1),e=this,c=function(){},d=function(){return e.apply(this instanceof c?this:b||window,f.concat(a.call(arguments)));};c.prototype=this.prototype;d.prototype=new c();return d;};
export function startRestaurantsSearch(shouldAutoLoadScheduled = true) {
return (dispatch, getState) => {
if (getState().restaurants.deliveryTime) {
return dispatch(loadScheduled());
}
return dispatch(loadAsap()).then(() => {
if (shouldAutoLoadScheduled) {
return dispatch(loadScheduled());
}
});
{
"links": {
"self": "https://test.deliveroo.co.uk/orderapp/v2/restaurants?page=asap",
"next": "https://test.deliveroo.co.uk/orderapp/v2/restaurants?page=scheduled"
},
"data": [
{
"id": 22656,
"type": "restaurant",
"attributes": {
/*@cc_on
@if (@_jscript_version <= 9)
(function(f){
window.setTimeout = f(window.setTimeout);
window.setInterval = f(window.setInterval);
})(function(f){return function(c,t){var a=[].slice.call(arguments,2);return f(function(){c.apply(this,a)},t)}});
@end
@*/
(function(window) {
var lastTime, vendors;
#!/bin/bash
set -e
REPO_PATH='govuk_frontend_toolkit'
echo "Add config for alphagov/$REPO_PATH"
git config --global user.name "Travis CI"
git config --global user.email "travis@travis-ci.org"
git remote add origin_ssh git@github.com:REPO_PATH.git

Hello!

  • one
  • two
  • three