-
Input from stdin
- ollama run llama3.1 "prompt"
-
Multiline input
- Using """
-
Input from file
- Using the pipe | operator:
- cat fox.txt | ollama run llama3.1 "Please translate the provided text to German"
- Using the pipe | operator:
-
Using the redirection operator < :
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
/** | |
* Encrypts plaintext using AES-GCM with supplied password, for decryption with aesGcmDecrypt(). | |
* (c) Chris Veness MIT Licence | |
* | |
* @param {String} plaintext - Plaintext to be encrypted. | |
* @param {String} password - Password to use to encrypt plaintext. | |
* @returns {String} Encrypted ciphertext. | |
* | |
* @example | |
* const ciphertext = await aesGcmEncrypt('my secret text', 'pw'); |
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
// 3D Dom viewer, copy-paste this into your console to visualise the DOM as a stack of solid blocks. | |
// You can also minify and save it as a bookmarklet (https://www.freecodecamp.org/news/what-are-bookmarklets/) | |
(() => { | |
const SHOW_SIDES = false; // color sides of DOM nodes? | |
const COLOR_SURFACE = true; // color tops of DOM nodes? | |
const COLOR_RANDOM = false; // randomise color? | |
const COLOR_HUE = 190; // hue in HSL (https://hslpicker.com) | |
const MAX_ROTATION = 180; // set to 360 to rotate all the way round | |
const THICKNESS = 20; // thickness of layers | |
const DISTANCE = 10000; // ¯\\_(ツ)_/¯ |
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
/* *-*-*-*-*-*-*-*-*-*-* Challenge 1 ------------------ | |
Create a variable with the type number and assign it an arbitrary value | |
*/ | |
// ---------------------------------------------------- | |
// *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*- | |
// ---------------------------------------------------- | |
/* *-*-*-*-*-*-*-*-*-*-* Challenge 2 ------------------ | |
Create a variable with the type string and use the addition operator to put two arbitrary words together | |
*/ |
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
<script> | |
import { onMount } from "svelte"; | |
import editorWorker from "monaco-editor/esm/vs/editor/editor.worker?worker"; | |
import jsonWorker from "monaco-editor/esm/vs/language/json/json.worker?worker"; | |
import cssWorker from "monaco-editor/esm/vs/language/css/css.worker?worker"; | |
import htmlWorker from "monaco-editor/esm/vs/language/html/html.worker?worker"; | |
import tsWorker from "monaco-editor/esm/vs/language/typescript/ts.worker?worker"; | |
let subscriptions = []; | |
export let content; |
[EDIT: I've added a part 2 to this blog post, to address some of the feedback that has come up: https://gist.github.com/getify/706e5e10822a298375da40f9cc1fa295]
Recently, this article on "The JavaScript Block Statement" came out, and it received some good discussion in a reddit thread. But the general reaction seems to be against this approach. That saddens me.
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
module.exports = { | |
content: ["./src/**/*.{html,js, jsx}"], | |
theme: { | |
extend: {}, | |
}, | |
plugins: [], | |
} |
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
{ | |
"extends": "next", | |
"rules": { | |
"react/no-unescaped-entities": "off", | |
"@next/next/no-page-custom-font": "off" | |
} | |
} |
that I bookmarked but never had enough time to read
- The Agile Manifesto
- React Philosophies - 🧘 Things I think about when I write React code 🧘
- The Product-Minded Software Engineer
- Architecture, Performance, and Games - Game Programming Patterns / Introduction
- Responsible Tech Playbook
- Small, Sharp Tools
- Why the developers who use Rust love it so much
- Testing - 8th Light Blog
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
All programmers are API designers: | |
Good programs are modular, and intermodular boundaries define APIs. Good modules get reused. | |
APIs can be among your greatest assets or liabilities: | |
Good APIs create long-term customers; bad ones create long-term support nightmares. | |
Public APIs, like diamonds, are forever: | |
You have one chance to get it right so give it your best. | |
APIs should be easy to use and hard to misuse: |
NewerOlder