Skip to content

Instantly share code, notes, and snippets.

View rickdaalhuizen90's full-sized avatar

Rick Daalhuizen rickdaalhuizen90

  • Belgium
  • 19:25 (UTC -12:00)
View GitHub Profile
@rickdaalhuizen90
rickdaalhuizen90 / .bashrc
Created February 12, 2017 17:20
Parrot Os bash theme for ubuntu
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
[ -z "$PS1" ] && return
# don't put duplicate lines in the history. See bash(1) for more options
# ... or force ignoredups and ignorespace
HISTCONTROL=ignoredups:ignorespace
@rickdaalhuizen90
rickdaalhuizen90 / cheatsheet.md
Created November 6, 2017 13:40
Sublime Text Vintage mode cheatsheet

Vintage mode

Command Action
:w save file
j move cursor up one line
k move cursor down one line
h move cursor one position right
l move cursor one position left
e move cursor to the end of word
0 move cursor to beginning of line
@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 / .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 / client.php
Last active September 26, 2023 17:17
PHP OAuth client for Magento 2 REST API
<?php
/*
* OAuth 1.0a client (Example) for Magento 2
*
* @see: https://oauth.net/core/1.0a
* @see: https://tools.ietf.org/html/rfc5849
*/
class Api
{
const OAUTH_VERSION = '1.0';
@rickdaalhuizen90
rickdaalhuizen90 / script.php
Last active July 31, 2023 01:50
PHP script that removes duplicate fields in a csv
<?php
/*
Read a csv file and remove duplicate values,
and update the csv with unique values
*/
($argc > 1)
or die('No argument has been given! Example: script.php foo.csv'.PHP_EOL);
(pathinfo($argv[1], PATHINFO_EXTENSION) === 'csv')
@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';