- Clone this Gist.
- For card sizes other than A5, edit the
size
value in@page
, and theheight
andwidth
properties ofbody
. - Add contents to each face. The simplest approach is to add an image called
front.png
of the same dimensions as the card. - Generate a PDF from the HTML + CSS. If using Prince, it's as simple as
prince index.html card.pdf
. - Take the PDF to a printer, and ask them to print as many copies as you need.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import RSSParser from 'npm:rss-parser' | |
await Deno.mkdir('audio', { recursive: true }) | |
const feedURL = 'https://anchor.fm/s/1252b450/podcast/rss' | |
const feed = await new RSSParser().parseURL(feedURL) | |
for (const item of feed.items) { | |
const { url } = item.enclosure | |
console.log(url) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const links = document.querySelectorAll('a[download]') | |
if (links.length === 0) { | |
console.log("No downloadable files found") | |
return | |
} | |
const handle = await showSaveFilePicker({ | |
suggestedName: 'files.zip', | |
types: [{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require 'File/MARC.php'; | |
$xsl = new DOMDocument; | |
$xsl->load('http://www.loc.gov/standards/mods/v3/MARC21slim2MODS3-4.xsl'); | |
$xsltproc = new XSLTProcessor; | |
$xsltproc->importStylesheet($xsl); | |
$marcxml = new DOMDocument; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<meta charset="utf-8"> | |
<title>Render the text of a PDF with PDF.js</title> | |
<style> | |
.page-container { | |
box-shadow: 0 1px 3px #444; | |
position: relative; | |
font-size: 1px; | |
line-height: 1; |
brew install git-lfs
git clone https://github.com/ml-explore/mlx-examples
cd mlx-examples/llms/mixtral
GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/mistralai/Mixtral-8x7B-Instruct-v0.1
cd Mixtral-8x7B-Instruct-v0.1
git lfs pull --include "consolidated.*.pt" # ~100GB
git lfs pull --include "tokenizer.model"
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { FieldProps } from 'formik' | |
import React from 'react' | |
import Select, { Option, ReactSelectProps } from 'react-select' | |
export const SelectField: React.SFC<ReactSelectProps & FieldProps> = ({ | |
options, | |
field, | |
form, | |
}) => ( | |
<Select |
https://api.elsevier.com/content/abstract/citations?pubmed_id=3472723&apiKey={API_KEY}&httpAccept=application/json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { DOMParser, type Element, } from "https://deno.land/x/deno_dom@v0.1.43/deno-dom-wasm.ts"; | |
const parser = new DOMParser() | |
const fetchDOM = async (url: string) => { | |
const response = await fetch(url) | |
if (!response.ok) { | |
throw new Error('Response was not ok') | |
} | |
const html = await response.text() |
NewerOlder