Skip to content

Instantly share code, notes, and snippets.

View mvaneijgen's full-sized avatar

Mitchel van Eijgen mvaneijgen

View GitHub Profile
import Vue from 'vue'
import { gsap } from "gsap";
import { DrawSVGPlugin } from "../static/DrawSVGPlugin.min.js";
import { MorphSVGPlugin } from "../static/MorphSVGPlugin.min.js";
import ScrollMagic from 'scrollmagic'
import 'imports-loader?define=>false!scrollmagic/scrollmagic/uncompressed/plugins/animation.gsap'
gsap.registerPlugin(DrawSVGPlugin, MorphSVGPlugin);
const GSAPScrollMagic = {
2020-04-21
No older events found at the moment. Retry.
13:45:57
START RequestId: 46169c68-fd33-4ace-ab16-f352be1798c1 Version: $LATEST
START RequestId: 46169c68-fd33-4ace-ab16-f352be1798c1 Version: $LATEST
13:46:02
2020-04-21T13:46:02.436Z 46169c68-fd33-4ace-ab16-f352be1798c1 ERROR Error occured in serverless-plugin-chrome wrapper when trying to ensure Chrome for hello() handler. { flags: [] } Error: Unable to start Chrome. If you have the DEBUG env variable set,there will be more in the logs. at /var/task/node_modules/@serverless-chrome/lambda/dist/bundle.cjs.js:376:13 at Generator.throw (<anonymous
2020-04-21T13:46:02.436Z 46169c68-fd33-4ace-ab16-f352be1798c1 ERROR Error occured in serverless-plugin-chrome wrapper when trying to ensure Chrome for hello() handler. { flags: [] } Error: Unable to start Chrome. If you have the DEBUG env variable set,there will be more in the logs.
@mvaneijgen
mvaneijgen / ogimages.js
Created April 1, 2020 11:43
Function to create OG images on a lamda function also should work on Netlify taken from Wes Bos
const chrome = require('chrome-aws-lambda');
const puppeteer = require('puppeteer-core');
const wait = require('waait');
const cached = new Map();
const exePath = '/Applications/Google Chrome.app/Contents/MacOS/Google Chrome';
async function getOptions(isDev) {
if (isDev) {
{
"bridge": {
"name": "Homebridge 39ED",
"username": "0E:6B:84:75:39:ED",
"port": 51988,
"pin": "617-71-158"
},
"hosts": [
{
"address": "191.168.1.69",
@mvaneijgen
mvaneijgen / input volume.applescript
Created February 18, 2020 14:13
MacOS AppleScript toggle microphone input volume from 0 to 100
if input volume of (get volume settings) is 0 then
set volume input volume 100
else
set volume input volume 0
end if
to clickClassName2(theClassName, elementnum)
if application "Safari" is running then
try
tell application "Safari"
repeat with t in tabs of windows
if URL of t contains "youtube.com/watch" then
tell t
do JavaScript "document.getElementsByClassName('" & theClassName & "')[" & elementnum & "].click();"
end tell
end if
Process: BetterTouchTool [64149]
Path: /Applications/BetterTouchTool.app/Contents/MacOS/BetterTouchTool
Identifier: com.hegenberg.BetterTouchTool
Version: 3.219 (1396)
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: BetterTouchTool [64149]
User ID: 501
Date/Time: 2020-01-24 13:23:25.268 +0100
@mvaneijgen
mvaneijgen / browser.txt
Created January 22, 2020 12:35 — forked from pankajparashar-zz/browser.txt
One line browser notepad
Version 1
---------
data:text/html, <html contenteditable>
Version 2
---------
data:text/html, <html><head><link href='http://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css'><style type="text/css"> html { font-family: "Open Sans" } * { -webkit-transition: all linear 1s; }</style><script>window.onload=function(){var e=false;var t=0;setInterval(function(){if(!e){t=Math.round(Math.max(0,t-Math.max(t/3,1)))}var n=(255-t*2).toString(16);document.body.style.backgroundColor="#ff"+n+""+n},1e3);var n=null;document.onkeydown=function(){t=Math.min(128,t+2);e=true;clearTimeout(n);n=setTimeout(function(){e=false},1500)}}</script></head><body contenteditable style="font-size:2rem;line-height:1.4;max-width:60rem;margin:0 auto;padding:4rem;">
Version 3
---------
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH=/Users/mitchelvaneijgen/.oh-my-zsh
# Set name of the theme to load. Optionally, if you set this to "random"
# it'll load a random theme each time that oh-my-zsh is loaded.
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
ZSH_THEME="cobalt2"
Process: BetterTouchTool [2804]
Path: /Applications/BetterTouchTool.app/Contents/MacOS/BetterTouchTool
Identifier: com.hegenberg.BetterTouchTool
Version: 3.219 (1396)
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: BetterTouchTool [2804]
User ID: 501
Date/Time: 2020-01-13 09:02:46.686 +0100