Skip to content

Instantly share code, notes, and snippets.

@tarleb
tarleb / list-formats.lua
Last active April 26, 2024 09:34
list-formats.lua
--- Lists the formats that support all the extensions given on the command line.
--
-- Usage:
--
-- pandoc lua list-formats.lua [extensions,...]
--
-- Example:
--
-- $ pandoc lua list-formats.lua native_numbering citations
-- docx
@vistamedia
vistamedia / migrate.php
Last active April 26, 2024 09:32
Migration example for Louis
<?php
// BOF MANU
// $old => $new
$categories = array(
1 => 3,
2 => 4,
3 => 5,
4 => 6,
5 => 7,
6 => 8,
@johndavedecano
johndavedecano / .gitlab-ci.yml
Last active April 26, 2024 09:32
CI/CD for ReactJS Application using GITLAB
cache:
paths:
- node_modules/
- .yarn
stages:
- build
- test
- deploy
build:
image: node:10
@jjakob
jjakob / Building_openmediavault_5_on_Buster.md
Last active April 26, 2024 09:30
Guide for building Openmediavault 5 on Debian Buster

This guide is only for Debian Buster (10) as of 2019-01-07. It was tested on a mipsel system (GnuBee PC2).

  1. Enable buster-backports (needed for monit)
echo "deb http://httpredir.debian.org/debian buster-backports main" >> /etc/apt/sources.list
apt-get update
  1. Install prerequisites
@manzt
manzt / my-ts-monorepo.md
Last active April 26, 2024 09:29
A minimal setup for TypeScript monorepo libraries

My Minimal TypeScript Monorepo Setup for ESM Libraries

After a deep dive looking up best practices for TypeScript monorepos recently, I couldn't find anything that suited my needs:

  1. Publish individual (typed) packages to NPM with minimal config.
  2. Supports fast unit testing that spans the entire project (e.g., via Vitest)
  3. Ability to have an interactive playground to experiment with the API in a real-time (e.g., via Vite)

Most solutions point to TypeScript project references,

@cjonesy
cjonesy / macbook_pro_ubuntu_install.md
Last active April 26, 2024 09:28
Installing Ubuntu on MacBook Pro

Macbook Pro - Ubuntu Install

Requirements

2 USB drives > 2GB

Pre-Install

Create bootable USB drive

  1. Grab the latest Ubuntu Desktop iso image
@groue
groue / ObservableState.swift
Last active April 26, 2024 09:28
WithBindable
import SwiftUI
/// Supplies an observable object to a view’s hierarchy.
///
/// The purpose of `WithBindable` is to make it possible to instantiate
/// observable objects from environment values, while keeping the object
/// alive as long as the view is rendered.
///
/// For example:
///
@coltonbh
coltonbh / docker-swarm-gpu.md
Last active April 26, 2024 09:28
Docker Swarm GPU Support

GPU Support For Docker Swarm

Docker compose has nice support for GPUs, K8s has moved their cluster-wide GPU scheduler from experimental to stable status. Docker swarm has yet to support the device option used in docker compose so the mechanisms for supporting GPUs on swarm are a bit more open-ended.

Basic documentation

@mensonones
mensonones / TouchableWithoutFeedback.js
Last active April 26, 2024 09:27
Added prop style for component TouchableWithoutFeedback (React Native 0.74) Path: node_modules/react-native/Libraries/Components/Touchable/TouchableWithoutFeedback.js
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow strict-local
* @format
*/
@claus
claus / _app.js
Created May 14, 2020 05:35
Restore scroll position after navigating via browser back/forward buttons in Next.js
import useScrollRestoration from "utils/hooks/useScrollRestoration";
const App = ({ Component, pageProps, router }) => {
useScrollRestoration(router);
return <Component {...pageProps} />;
};
export default App;