Skip to content

Instantly share code, notes, and snippets.

View sambeevors's full-sized avatar
🏠
Working from home

Sam Beevors sambeevors

🏠
Working from home
View GitHub Profile
@sambeevors
sambeevors / main.py
Created March 28, 2020 19:58
HealthyGamer Intro to Programming #3
# 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
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 / outlook-scaling.html
Created January 13, 2020 14:37
Email Development: Outlook Scaling
<!--[if mso]>
<xml>
<o:OfficeDocumentSettings>
<o:PixelsPerInch>96</o:PixelsPerInch>
</o:OfficeDocumentSettings>
</xml>
<![endif]-->
@sambeevors
sambeevors / outlook-fonts.html
Created January 13, 2020 14:36
Email Development: Outlook Fonts
<!--[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]-->
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 / toSpongeCase.js
Created June 21, 2019 09:39
tHiS Is a sTuPiD IdEa
const toSpongeCase = string =>
[...string]
.map((x, i) => x[`to${i % 2 ? 'Upper' : 'Lower'}Case`]())
.join('')
@sambeevors
sambeevors / HeightGroup.js
Created June 5, 2019 13:56
Tiny JS class to match the height of supplied elements
class HeightGroup {
constructor(els) {
this.nodeArray = [...els]
this.nodeHeights
this.newHeight
}
matchHeights() {
this.nodeHeights = []
this.newHeight = null
@sambeevors
sambeevors / muh-stack.md
Last active November 30, 2018 19:30
Everything I use for web development

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
!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*