Skip to content

Instantly share code, notes, and snippets.

@fetimo
fetimo / spelling-test.rb
Created May 24, 2017 21:10
Spelling test
require 'httparty'
WORDS = [
'quixotic',
'abstemious',
'piquancy',
'potentate',
'proselytized',
'parricide',
'épater',
@fetimo
fetimo / gateway.js
Created June 7, 2022 08:50
Basic Apollo gateway
import { ApolloServer } from 'apollo-server-micro';
import { ApolloGateway, IntrospectAndCompose } from '@apollo/gateway';
const apolloServer = new ApolloServer({
gateway: new ApolloGateway({
supergraphSdl: new IntrospectAndCompose({
subgraphs: [
{ name: 'saleor', url: process.env.SALEOR_GRAPHQL },
],
}),
@fetimo
fetimo / leif-poc.rb
Created July 9, 2022 21:00
Charging energy -> CO2 output
#!/usr/bin/env ruby
# TODO: Need to work out how to do impact this charging session and impact overall
# <xbar.title>Lush Energy</xbar.title>
# <xbar.version>v1.0</xbar.version>
# <xbar.author>Tim Stone</xbar.author>
# <xbar.author.github>fetimo</xbar.author.github>
# <xbar.desc>This plugin displays the current carbon (gC02equivalent) emmissions per kWh of produced electric energy in the requested country/region </xbar.desc>
# <xbar.dependencies>ruby, CO2 Signal</xbar.dependencies>