Skip to content

Instantly share code, notes, and snippets.

🏠
Working from home

Sam Beevors sambeevors

🏠
Working from home
View GitHub Profile
View ezcanvas.js
!function(t){function e(s){if(n[s])return n[s].exports;var i=n[s]={i:s,l:!1,exports:{}};return t[s].call(i.exports,i,i.exports,e),i.l=!0,i.exports}var n={};return e.m=t,e.c=n,e.i=function(t){return t},e.d=function(t,n,s){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:s})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=4)}([function(t,e,n){"use strict";function s(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),e.Ease=e.EZCanvas=void 0;var i=n(1),a=s(i),r=n(3),o=n(2),c=s(o),u={inQuad:function(t){return t*t},outQuad:function(t){return t*(2-t)},inOutQuad:function(t){return t<.5?2*t*t:-1+(4-2*t)*t},inCubic:function(t){return t*t*t},outCubic:function(t){return--t*t*t+1},inOutCubic:function(t){return t<.5?4*t*t*t:(t-1)*(2*t-2)*(2*t-2)+1},inQuart:function(t){return t*t*t*t},outQuart:function(t){return 1- --t*t*
@sambeevors
sambeevors / muh-stack.md
Last active Nov 30, 2018
Everything I use for web development
View muh-stack.md

My Development Stack

Editor

I use VScode with the following extensions:

  • Bracket Pair Colorizer
  • Code Runner
  • DotEnv
  • Easy icon theme
  • EditorConfig for VS Code
  • ESLint
@sambeevors
sambeevors / HeightGroup.js
Created Jun 5, 2019
Tiny JS class to match the height of supplied elements
View HeightGroup.js
class HeightGroup {
constructor(els) {
this.nodeArray = [...els]
this.nodeHeights
this.newHeight
}
matchHeights() {
this.nodeHeights = []
this.newHeight = null
@sambeevors
sambeevors / toSpongeCase.js
Created Jun 21, 2019
tHiS Is a sTuPiD IdEa
View toSpongeCase.js
const toSpongeCase = string =>
[...string]
.map((x, i) => x[`to${i % 2 ? 'Upper' : 'Lower'}Case`]())
.join('')
View SpigotBoilerplate.java
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.plugin.java.JavaPlugin;
public class Main extends JavaPlugin {
@Override
public void onEnable() {
}
@sambeevors
sambeevors / outlook-fonts.html
Created Jan 13, 2020
Email Development: Outlook Fonts
View outlook-fonts.html
<!--[if mso]>
<style>
table {border-collapse: collapse;}
td,th,div,p,a,h1,h2,h3,h4,h5,h6 {font-family: "Segoe UI", sans-serif; mso-line-height-rule: exactly;}
</style>
<![endif]-->
@sambeevors
sambeevors / outlook-scaling.html
Created Jan 13, 2020
Email Development: Outlook Scaling
View outlook-scaling.html
<!--[if mso]>
<xml>
<o:OfficeDocumentSettings>
<o:PixelsPerInch>96</o:PixelsPerInch>
</o:OfficeDocumentSettings>
</xml>
<![endif]-->
View Image.js
import 'intersection-observer'
import { useState } from 'react'
import { useInView } from 'react-intersection-observer'
const Image = ({ src, alt = '', width, height, style = {}, ...props }) => {
const [ref, inView] = useInView({
threshold: 0,
triggerOnce: true
})
@sambeevors
sambeevors / main.py
Created Mar 28, 2020
HealthyGamer Intro to Programming #3
View main.py
# Introduction to for loops
pokemons = ['Gengar', 'Dialga', 'Pikachu', 'Clefairy', 'Zapdos', 'Magikarp']
index = 0
while index < len(pokemons):
pokemon = pokemons[index]
print('index: ' + str(index))
print('pokemon: ' + pokemon)
index += 1
You can’t perform that action at this time.