Skip to content

Instantly share code, notes, and snippets.

View notflip's full-sized avatar
🎯
Focusing

Miguel Stevens notflip

🎯
Focusing
  • Studio Monty
  • Ghent, Belgium
View GitHub Profile
@paulsturgess
paulsturgess / service.js
Last active August 8, 2024 04:25
An example Service class wrapper for Axios
import axios from 'axios';
class Service {
constructor() {
let service = axios.create({
headers: {csrf: 'token'}
});
service.interceptors.response.use(this.handleSuccess, this.handleError);
this.service = service;
}
@jaakkolehtonen
jaakkolehtonen / oh-my-zsh-custom-installation.sh
Last active March 19, 2021 00:22
Custom @ohmyzsh installation which keeps ~/.zshrc in sync via @dropbox
# Create hidden folder for Oh My Zsh core installation with subfolders for custom plugins and themes
mkdir -p ~/.zsh/custom/{plugins,themes}
# Clone Oh My Zsh from Github into root of hidden ~/.zsh directory
git clone git://github.com/robbyrussell/oh-my-zsh.git ~/.zsh/oh-my-zsh
# Clone Powerlevel9k theme to ~/.zsh/custom/themes folder
git clone https://github.com/bhilburn/powerlevel9k.git ~/.zsh/custom/themes/powerlevel9k
# Fetch and install Nerd Font from Github to be used with our new shell config (http://nerdfonts.com/#downloads), long script but does the job :)
@Livog
Livog / config.ts
Last active February 14, 2025 07:02
Payload CMS 3.0 Path Field to simplify frontend querying
import type { CollectionSlug } from 'payload'
export const PATH_UNIQUE_AGINST_COLLECTIONS = ['pages', 'posts'] as const satisfies CollectionSlug[]
export const FIELD_TO_USE_FOR_PATH = 'slug' as const