Skip to content

Instantly share code, notes, and snippets.

View mvaneijgen's full-sized avatar

Mitchel van Eijgen mvaneijgen

View GitHub Profile
<?php
$taxonamy = 'location';
$terms = get_terms($taxonamy, array('hide_empty' => true));
?>
<?php if (!empty($terms) && !is_wp_error($terms)) : ?>
<?php foreach ($terms as $term) : ?>
<?php
$args = array(
'post_type' => 'thanks',
'posts_per_page' => -1,
{
"key": "group_58f9b55cdbf02",
"title": "Flex",
"fields": [
{
"key": "field_58f9b56154b9a",
"label": "Contentblokken",
"name": "content-blocks",
"type": "flexible_content",
"instructions": "",
@mvaneijgen
mvaneijgen / colorSorting.js
Created April 25, 2020 14:33 — forked from afonsograca/colorSorting.js
Color sorting in JavaScript
//Sorting Hex Color:
var scheme = [
"#4C4C4C","#1F2029","#35404E","#282938","#00A0BE","#C67C48","#32CF72", "#4155D1","#B86838","#D81196","#149C92","#786DC4","#DB2C38","#83C057", "#A4A4A4","#55747C","#FFFFFF"
];
var Color = function Color(hexVal) { //define a Color class for the color objects
this.hex = hexVal;
};
000
001
002
003
004
005
006
007
008
009
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.
<?php $args = array(
'post_type' => 'post',
'posts_per_page' => -1,
); ?>
<?php $loop = new WP_Query($args); ?>
<?php if ($loop->have_posts()) : ?>
<?php while ($loop->have_posts()) : $loop->the_post(); ?>
<?php get_template_part('templates/content', get_post_type()); ?>
<?php endwhile; ?>
<?php endif; ?>
@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 / Screencast Setup.scpt
Created March 9, 2015 14:10
Change screen resolution using Applescript works on 10.10 non-rentia macbook
-- Launch "System Preferences", open the "Displays" options and change to the "Display" tab
tell application "System Preferences"
activate
set the current pane to pane id "com.apple.preference.displays"
reveal anchor "displaysDisplayTab" of pane id "com.apple.preference.displays"
end tell
local indexToUse
-- Now lets make the necessary changes