Skip to content

Instantly share code, notes, and snippets.

View noxify's full-sized avatar

Marcus Reinhardt noxify

View GitHub Profile
// license: MIT
import type { FileSystemEntry } from "renoun/file-system"
import { Directory, EntryGroup, MemoryFileSystem } from "renoun/file-system"
const renounFileSystem = new MemoryFileSystem({
"index.mdx": "",
"01.section-title/01.introduction.mdx": "",
"01.getting-started.mdx": "",
"03.section-with-index/index.mdx": "",
"03.section-with-index/01.introduction.mdx": "",
// user.repository.ts
import { db } from "../client"
import { createRepository } from "../repository"
export const userRepository = createRepository({ db, table: "users", queryBuilder: db.query.users })
// session.repository.ts
import { db } from "../client"
import { createRepository } from "../repository"
@noxify
noxify / helpers_parquet.ts
Last active May 9, 2023 14:42
Parquet generation via JSON-Schema
// file: helpers/parquet.ts
import {
FieldDefinition,
ParquetType,
SchemaDefinition,
} from '@dsnp/parquetjs/dist/lib/declare'
import { JSONSchema4 } from 'json-schema'
export function createStringField({
optional = true,
@noxify
noxify / CustomImage.tsx
Created September 19, 2022 08:39
custom image for tailwind ui syntax template
// src/components/CustomImage.tsx
import Image from 'next/image'
import 'yet-another-react-lightbox/styles.css'
import Lightbox from 'yet-another-react-lightbox'
import { useState } from 'react'
/**
* Generates the correct asset and base path
* for the gitlab pages
@noxify
noxify / Calendar.vue
Created December 24, 2020 12:07
Reactive Calendar filter
// /src/pages/Calendar.vue
// --> http://localhost:8080/calendar
<template>
<div>
<datetime v-model="date"></datetime>
<ul>
<li v-for="event in filteredList" :key="event.id">
{{ event.node.summary }}
.
|-src
| |-components
| |-layouts
| |-templates
| |-assets
| | |-remoteImages
| | | |- image.png ( <-- my example image which is used in the code below )
| |-pages
|-packages
<?php
function loadCss() {
wp_enqueue_style('bootstrap', 'https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css');
}
function loadJavascript() {
wp_deregister_script('jquery');
wp_enqueue_script('jquery', 'https://code.jquery.com/jquery-3.5.1.slim.min.js', array(), null, true);
wp_enqueue_script('popperjs', 'https://cdn.jsdelivr.net/npm/[email protected]/dist/umd/popper.min.js', array('jquery'), false, true);
@noxify
noxify / content-example.js
Created February 9, 2020 13:09
gridsome - download remote files
// /content/entries/entry1.md
---
title: First Post
excerpt: First Post
date: 2020-01-14T21:53:14.578Z
localImage: ./sumit-saharkar-d3_ssraccV8-unsplash.jpg
remoteImage: https://images.unsplash.com/photo-1580451998921-c1e6e1ababe0?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=2850&q=80
---
@noxify
noxify / Testing.vue
Last active December 10, 2019 21:39
/*
/src/pages/Testing.vue
*/
<template>
<DefaultLayout>
<ul>
<li
v-for="edge in $page.records.edges"
:key="edge.node.id"
>
//hugo