Skip to content

Instantly share code, notes, and snippets.

View georgebutter's full-sized avatar
๐Ÿ‘ป

George Butter georgebutter

๐Ÿ‘ป
  • Mindfulness.com
  • Melbourne
View GitHub Profile
@bjoerge
bjoerge / ExternalDataInput.js
Created December 21, 2018 12:46
Example of a custom sanity input that allows the user to select from a list of values retrieved from an external API
import React from 'react'
import SearchableSelect from 'part:@sanity/components/selects/searchable'
import FormField from 'part:@sanity/components/formfields/default'
import {PatchEvent, set, unset} from 'part:@sanity/form-builder/patch-event'
const STREET_NAMES = [
'Thorvald Meyers gate',
'Champs-ร‰lysรฉes',
'Lombard Street',
'Abbey Road',
@astromac
astromac / Set Content Offset
Last active May 18, 2016 03:59
Positions content below a fixed header and does this everytime the window size changes
function contentOffset() {
var droppx = /\d+/;
var navheight = $('header > .navbar').css('height');
var subnavheight = $('header > .navbar + .sub-nav').css('height');
var breadcrumbheight = $('.breadcrumb').css('height');
var offset = 0;
if ($('.page-header').length > 0) {
var pageheaderheight = $('.page-header').css('height');
offset = parseInt(navheight.match(droppx)) + parseInt(subnavheight.match(droppx)) + parseInt(breadcrumbheight.match(droppx)) + parseInt(pageheaderheight.match(droppx)) + 1;
} else {
@rxaviers
rxaviers / gist:7360908
Last active May 13, 2025 14:01
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: ๐Ÿ˜„ :smile: ๐Ÿ˜† :laughing:
๐Ÿ˜Š :blush: ๐Ÿ˜ƒ :smiley: โ˜บ๏ธ :relaxed:
๐Ÿ˜ :smirk: ๐Ÿ˜ :heart_eyes: ๐Ÿ˜˜ :kissing_heart:
๐Ÿ˜š :kissing_closed_eyes: ๐Ÿ˜ณ :flushed: ๐Ÿ˜Œ :relieved:
๐Ÿ˜† :satisfied: ๐Ÿ˜ :grin: ๐Ÿ˜‰ :wink:
๐Ÿ˜œ :stuck_out_tongue_winking_eye: ๐Ÿ˜ :stuck_out_tongue_closed_eyes: ๐Ÿ˜€ :grinning:
๐Ÿ˜— :kissing: ๐Ÿ˜™ :kissing_smiling_eyes: ๐Ÿ˜› :stuck_out_tongue:
@acacio
acacio / upnp.js
Created January 12, 2012 21:17
UPNP Port Forwarding for node.js
/* node UPNP port forwarding PoC
This is a simple way to forward ports on NAT routers with UPNP.
This is a not-for-production hack that I found useful when testing apps
on my home network behind ny NAT router.
-satori
usage: