Skip to content

Instantly share code, notes, and snippets.

View rickdaalhuizen90's full-sized avatar

Rick Daalhuizen rickdaalhuizen90

  • Belgium
  • 10:18 (UTC -12:00)
View GitHub Profile
@rickdaalhuizen90
rickdaalhuizen90 / .env.example
Created December 27, 2023 20:04
Generate a commit message using the OpenAI GPT-3 API
OPENAI_API_KEY="<YOUR_SECRET_KEY>"
OPENAI_ENDPOINT="https://api.openai.com/v1/chat/completions"
@rickdaalhuizen90
rickdaalhuizen90 / index.html
Created August 20, 2022 15:16
Pokemon Cards Holo effect v2
<svg viewBox="0 0 330 330">
<g>
<path d="M304.394,139.394l-139.39,139.393L25.607,139.393c-5.857-5.857-15.355-5.858-21.213,0.001 c-5.858,5.858-5.858,15.355,0,21.213l150.004,150c2.813,2.813,6.628,4.393,10.606,4.393s7.794-1.581,10.606-4.394l149.996-150 c5.858-5.858,5.858-15.355,0-21.213C319.749,133.536,310.251,133.535,304.394,139.394z" />
<path d="M154.398,190.607c2.813,2.813,6.628,4.393,10.606,4.393s7.794-1.581,10.606-4.394l149.996-150 c5.858-5.858,5.858-15.355,0-21.213c-5.857-5.858-15.355-5.858-21.213,0l-139.39,139.393L25.607,19.393 c-5.857-5.858-15.355-5.858-21.213,0c-5.858,5.858-5.858,15.355,0,21.213L154.398,190.607z" />
</g>
</svg>
<p class="scroll">Scroll 4 moar!</p>
<!--
yes, im totally cheating here... I built these cards and app in SvelteKit and thought I'd be able to export it into a plain JS file to put in Codepen... however it seems it's not possible, and Codepen can't handle Svelte (yet?), so I deployed to Netlify and linked with an iFrame.
{
"2Dimensions": {
"errorType": "status_code",
"url": "https://2Dimensions.com/a/{}",
"urlMain": "https://2Dimensions.com/",
"username_claimed": "blue",
"username_unclaimed": "noonewouldeverusethis7"
},
"3dnews": {
"errorMsg": "\u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043d\u0435 \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d \u0438 \u043d\u0435 \u0438\u043c\u0435\u0435\u0442 \u043f\u0440\u043e\u0444\u0438\u043b\u044f \u0434\u043b\u044f \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430.",
@rickdaalhuizen90
rickdaalhuizen90 / App.svelte
Last active December 30, 2021 22:00
Calendar heatmap
<section>
<h3>Uptime</h3>
<p>Overview of site uptime</p>
<div id="heatmap"></div>
</section>
<script>
import {onMount} from 'svelte';
import matrix from 'calendar-matrix';
@rickdaalhuizen90
rickdaalhuizen90 / hosts.txt
Created August 24, 2021 14:59
Personal Block List
127.0.0.1 nu.nl
127.0.0.1 nos.nl
127.0.0.1 dumpert.nl
127.0.0.1 thejakartapost.com
127.0.0.1 reddit.com
127.0.0.1 facebook.com
@rickdaalhuizen90
rickdaalhuizen90 / .zshrc
Created July 13, 2020 18:03
Enhance your terminal with zsh and Prezto
#
# Executes commands at the start of an interactive session.
#
# Authors:
# Sorin Ionescu <sorin.ionescu@gmail.com>
#
# Source Prezto.
if [[ -s "${ZDOTDIR:-$HOME}/.zprezto/init.zsh" ]]; then
source "${ZDOTDIR:-$HOME}/.zprezto/init.zsh"
@rickdaalhuizen90
rickdaalhuizen90 / db_schema.xml
Created June 25, 2020 16:15
Magento 2 generated declarative schema
<?xml version="1.0"?>
<schema xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Setup/Declaration/Schema/etc/schema.xsd">
<table name="quote_item_file" resource="default" engine="innodb" comment="Quote Item File Table">
<column xsi:type="int" name="entity_id" padding="11" unsigned="false" nullable="false" identity="true" comment="Entity ID"/>
<column xsi:type="varchar" name="filename" nullable="false" length="255" comment="Filename"/>
<column xsi:type="varchar" name="location" nullable="false" length="255" comment="Location of file"/>
<column xsi:type="int" name="quote_item_item_id" padding="10" unsigned="true" nullable="false" identity="false" comment="Item Id"/>
<constraint xsi:type="primary" referenceId="PRIMARY">
<column name="entity_id"/>
</constraint>
@rickdaalhuizen90
rickdaalhuizen90 / db_schema.xml
Created June 25, 2020 16:05
Magento 2 declarative scheme without location
<?xml version="1.0"?>
<schema xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Setup/Declaration/Schema/etc/schema.xsd">
<table name="quote_item_file" resource="default" engine="innodb" comment="Quote Item File Table">
<column xsi:type="int" name="entity_id" padding="11" unsigned="false" nullable="false" identity="true" comment="Entity ID"/>
<column xsi:type="varchar" name="filename" nullable="false" length="255" comment="Filename"/>
<!--<column xsi:type="varchar" name="location" nullable="false" length="255" comment="Location of file"/>-->
<column xsi:type="int" name="quote_item_item_id" padding="10" unsigned="true" nullable="false" identity="false" comment="Item Id"/>
<constraint xsi:type="primary" referenceId="PRIMARY">
<column name="entity_id"/>
</constraint>
@rickdaalhuizen90
rickdaalhuizen90 / InstallSchema.php
Created June 25, 2020 16:04
Magento 2 InstallSchema
<?php
/**
* Copyright (c) 2016 Magento. All rights reserved.
* See COPYING.txt for license details.
*/
namespace Rick\Example\Setup;
use Magento\Framework\DB\Ddl\Table;
use Magento\Framework\Setup\InstallSchemaInterface;