Skip to content

Instantly share code, notes, and snippets.

Mitchel van Eijgen mvaneijgen

Block or report user

Report or block mvaneijgen

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@mvaneijgen
mvaneijgen / ogimages.js
Created Apr 1, 2020
Function to create OG images on a lamda function also should work on Netlify taken from Wes Bos
View ogimages.js
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) {
View config.json
{
"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 Feb 18, 2020
MacOS AppleScript toggle microphone input volume from 0 to 100
View input volume.applescript
if input volume of (get volume settings) is 0 then
set volume input volume 100
else
set volume input volume 0
end if
View Action run apple script async.applescript
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
View BTT crash Move mouse to position
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 Jan 22, 2020 — forked from pankajparashar-zz/browser.txt
One line browser notepad
View browser.txt
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
---------
View .zshrc
# 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"
View btt crash mouse position
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
View Problem report for Rocket League
Process: TAGame [88030]
Path: /Users/USER/Library/Application Support/Steam/*/RocketLeague.app/Contents/MacOS/TAGame
Identifier: com.Psyonix.rleague
Version: 1.0 (1)
Code Type: X86-64 (Native)
Parent Process: steam_osx [26513]
Responsible: steam_osx [26513]
User ID: 501
Date/Time: 2020-01-09 17:14:30.932 +0100
View functions.php
<?php
//------------------------------------------------------//
// Add pagination to topics
//------------------------------------------------------//
function wpup_bbp_list_replies($args)
{
// Reset the reply depth
bbpress()->reply_query->reply_depth = 0;
You can’t perform that action at this time.