Qortora · Search · Indexed page

pygments-styles.orgFetched 2026-08-13T18:50:13Z

Pygments Styles

A curated collection of Pygments styles based on VS Code themes.

Open original source · Full cached text

Pygments Styles Pygments Styles Projects Shibuya A responsive, good looking with modern design documentation theme for Sphinx. Pygments Styles A curated collection of Pygments styles based on VS Code themes. Sphinx Iconify A sphinx extension to use <iconify-icon> web component. Mistune A fast yet powerful Python Markdown parser with renderers and plugins. Wenmode A fast, composable Markdown parser and renderer toolkit. Support me / Pygments Styles¶ A curated collection of Pygments styles based on VS Code themes. Docs GitHub Language bash c css diff go html+jinja html java javascript lua markdown php python-console python rebol rst ruby rust scheme sql swift toml typescript vue Style andromeeda aurora-x ayu-dark ayu-light ayu-mirage catppuccin-frappe catppuccin-latte catppuccin-macchiato catppuccin-mocha dark-plus everforest-dark everforest-light github-dark-default github-dark-dimmed github-dark-high-contrast github-light-default github-light-high-contrast gruvbox-dark-hard gruvbox-dark-medium gruvbox-dark-soft gruvbox-light-hard gruvbox-light-medium gruvbox-light-soft laserwave laserwave-high-contrast light-plus min-dark min-light one-dark-pro one-light plastic bash #!/bin/bash # weather.sh # Copyright 2018 computer-geek64. All rights reserved. program=Weather version=1.1 year=2018 developer=computer-geek64 case $1 in -h | --help) echo "$program $version" echo "Copyright $year $developer. All rights reserved." echo echo "Usage: weather [options]" echo "Option Long Option Description" echo "-h --help Show the help screen" echo "-l [location] --location [location] Specifies the location" ;; -l | --location) curl https://wttr.in/$2 ;; *) curl https://wttr.in ;; esac c 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 #include <stdio.h> #define ARR_LEN 7 void qsort(int v[], int left, int right); void printArr(int v[], int len); int main() { int i; int v[ARR_LEN] = { 4, 3, 1, 7, 9, 6, 2 }; printArr(v, ARR_LEN); qsort(v, 0, ARR_LEN-1); printArr(v, ARR_LEN); return 0; } void qsort(int v[], int left, int right) { int i, last; void swap(int v[], int i, int j); if (left >= right) return; swap(v, left, (left + right) / 2); last = left; for (i = left+1; i <= right; i++) if (v[i] < v[left]) swap(v, ++last, i); swap(v, left, last); qsort(v, left, last-1); qsort(v, last+1, right); } void swap(int v[], int i, int j) { int temp; temp = v[i]; v[i] = v[j]; v[j] = temp; } void printArr(int v[], int len) { int i; for (i = 0; i < len; i++) printf("%d ", v[i]); printf("\n"); } // From https://github.com/Heatwave/The-C-Programming-Language-2nd-Edition/blob/master/chapter-4-functions-and-program-structure/8.qsort.c css html { margin: 0; background: black; height: 100%; } body { margin: 0; width: 100%; height: inherit; } /* the three main rows going down the page */ body > div { height: 25%; } .thumb { float: left; width: 25%; height: 100%; object-fit: cover; } .main { display: none; } .blowup { display: block; position: absolute; object-fit: contain; object-position: center; top: 0; left: 0; width: 100%; height: 100%; z-index: 2000; } .darken { opacity: 0.4; } /* From https://github.com/mdn/css-examples/blob/main/object-fit-gallery/style.css */ diff $ cat file1.txt cat mv comm cp $ cat file2.txt cat cp diff comm $ diff -c file1.txt file2.txt *** file1.txt Thu Jan 11 08:52:37 2018 --- file2.txt Thu Jan 11 08:53:01 2018 *************** *** 1,4 **** cat - mv - comm cp --- 1,4 ---- cat cp + diff + comm # From https://www.geeksforgeeks.org/diff-command-linux-examples/ go package main import ( "fmt" "log" "net/http" ) func handler(w http.ResponseWriter, r *http.Request) { fmt.Fprintf(w, "Hi there, I love %s!", r.URL.Path[1:]) } func main() { http.HandleFunc("/", handler) log.Fatal(http.ListenAndServe(":8080", nil)) } html+jinja {# templates/results.html #} <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Results</title> </head> <body> <h1>{{ test_name }} Results</h1> <ul> {% for student in students %} <li> <em>{{ student.name }}:</em> {{ student.score }}/{{ max_score }} </li> {% endfor %} </ul> </body> </html> {# From https://realpython.com/primer-on-jinja-templating/#use-if-statements #} html <!DOCTYPE html> <html lang="en-us"> <head> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width" /> <title>MDN Web Docs Example: Toggling full-screen mode</title> <link rel="stylesheet" href="styles.css"> <style class="editable"> video::backdrop { background-color: #448; } </style> <!-- import the webpage's javascript file --> <script src="script.js" defer></script> </head> <body> <section class="preview"> <video controls src="https://archive.org/download/BigBuckBunny_124/Content/big_buck_bunny_720p_surround.mp4" poster="https://peach.blender.org/wp-content/uploads/title_anouncement.jpg?x11217" width="620"> Sorry, your browser doesn't support embedded videos. Time to upgrade! </video> </section> <textarea class="playable playable-css" style="height: 100px;"> video::backdrop { background-color: #448; } </textarea> <textarea class="playable playable-html" style="height: 200px;"> <video controls src="https://archive.org/download/BigBuckBunny_124/Content/big_buck_bunny_720p_surround.mp4" poster="https://peach.blender.org/wp-content/uploads/title_anouncement.jpg?x11217" width="620"> Sorry, your browser doesn't support embedded videos. Time to upgrade! </video> </textarea> <div class="playable-buttons"> <input id="reset" type="button" value="Reset" /> </div> </body> <script src="playable.js"></script> </body> </html> <!-- From https://github.com/mdn/css-examples/blob/main/backdrop/index.html --> java import java.awt.Rectangle; public class ObjectVarsAsParameters { public static void main(String[] args) { go(); } public static void go() { Rectangle r1 = new Rectangle(0,0,5,5); System.out.println("In method go. r1 " + r1 + "\n"); // could have been //System.out.prinltn("r1" + r1.toString()); r1.setSize(10, 15); System.out.println("In method go. r1 " + r1 + "\n"); alterPointee(r1); System.out.println("In method go. r1 " + r1 + "\n"); alterPointer(r1); System.out.println("In method go. r1 " + r1 + "\n"); } public static void alterPointee(Rectangle r) { System.out.println("In method alterPointee. r " + r + "\n"); r.setSize(20, 30); System.out.println("In method alterPointee. r " + r + "\n"); } public static void alterPointer(Rectangle r) { System.out.println("In method alterPointer. r " + r + "\n"); r = new Rectangle(5, 10, 30, 35); System.out.println("In method alterPointer. r " + r + "\n"); } } javascript // --- Demonstration of imports --- // Importing named exports and the default export import defaultAnimal, { person, add } from './module.js'; // Importing everything from the module as an alias import * as Module from './module.js'; // --- Demonstration of exports --- // Named exports export const person = { name: "Alice", age: 30 }; export function add(x, y = 0) { return x + y; } // Default export const defaultAnimal = { name: "Default Animal" }; export default defaultAnimal; // Generator function export function* idGenerator() { let id = 0; while (true) { yield id++; } } // Using typeof for runtime type checks console.log(typeof person); // object console.log(add(2, 3)); // 5 console.log(defaultAnimal); // { name: "Default Animal" } // Emulating 'satisfies' behavior using runtime checks function createAnimal(animal) { if (typeof animal.name === 'string') { return animal; // Ensures the animal has a 'name' property } throw new Error("Animal must have a name"); } const dog = createAnimal({ name: "Buddy", breed: "Golden Retriever" }); console.log(dog); // { name: 'Buddy', breed: 'Golden Retriever' } // Generator usage const generator = Module.idGenerator(); console.log(generator.next().value); // 0 console.log(generator.next().value); // 1 console.log(generator.next().value); // 2 // Handling a generic-like behavior by allowing any type and runtime checks function identity(arg) { return arg; } let str = identity("Hello"); let num = identity(42); console.log(str, num); // "Hello", 42 // Emulating default generics by using default parameters function wrapInArray(value = "") { return [value]; } const stringArray = wrapInArray(); // Default is empty string const numberArray = wrapInArray(42); // Passes 42 explicitly console.log(stringArray, numberArray); // [""] , [42] // --- for-of and for-in loops --- // for-of: Iterates over iterable objects like arrays, strings, maps, etc. const fruits = ["apple", "banana", "cherry"]; for (const fruit of fruits) { console.log(fruit); // Outputs: apple, banana, cherry } // for-in: Iterates over enumerable properties of an object const car = { make: "Tesla", model: "Model S", year: 2021 }; for (const key in car) { if (car.hasOwnProperty(key)) { console.log(`${key}: ${car[key]}`); // Outputs key-value pairs of car object } } // --- IIFE (Immediately Invoked Function Expression) --- (function () { console.log("This IIFE runs immediately after it's defined."); const privateVar = "I'm private inside the IIFE!"; console.log(privateVar); // Accessing the private variable inside the IIFE })(); // --- Using a generator to loop indefinitely --- function* infiniteGenerator() { let i = 0; while (true) { yield i++; } } const gen = infiniteGenerator(); console.log(gen.next().value); // 0 console.log(gen.next().value); // 1 // --- Async and Await --- async function fetchData(url) { try { const response = await fetch(url); if (!response.ok) { throw new Error('Network response was not ok'); } const data = await response.json(); return data; } catch (error) { console.error('There has been a problem with your fetch operation:', error); } } // Example usage of async function fetchData('https://jsonplaceholder.typicode.com/todos/1') .then(data => console.log(data)) // Outputs fetched data .catch(error => console.error(error)); // JSDoc type annotations /** * @typedef {Object} Task * @property {string} title * @property {boolean} completed */ /** * Create a task * @param {Task} task * @returns {Task} */ function createTask(task) { return task; } const myTask = createTask({ title: "Learn JavaScript", completed: false, }); console.log(myTask); // Importing everything as a namespace (simulated for demonstration) console.log(Module.person); // { name: "Alice", age: 30 } console.log(Module.add(10, 20)); // 30 lua ball = { xpos = 60, ypos = 60, -- without the colon syntax, must mention self argument explicitly move = function(self, newx, newy) self.xpos = newx self.ypos = newy end } -- using the colon, ball is passed as self automatically ball:move(100, 120) -- using the dot, must pass self explicitly ball.move(ball, 100, 120) markdown An h1 header ============ Paragraphs are separated by a blank line. 2nd paragraph. *Italic*, **bold**, and `monospace`. Itemized lists look like: * this one * that one * the other one Note that --- not considering the asterisk --- the actual text content starts at 4-columns in. > Block quotes are > written like so. > > They can span multiple paragraphs, > if you like. Use 3 dashes for an em-dash. Use 2 dashes for ranges (ex., "it's all in chapters 12--14"). Three dots ... will be converted to an ellipsis. Unicode is supported. ☺ An h2 header ------------ Here's a numbered list: 1. first item 2. second item 3. third item Note again how the actual text starts at 4 columns in (4 characters from the left side). Here's a code sample: # Let me re-iterate ... for i in 1 .. 10 { do-something(i) } As you probably guessed, indented 4 spaces. By the way, instead of indenting the block, you can use delimited blocks, if you like: ~~~ define foobar() { print "Welcome to flavor country!"; } ~~~ (which makes copying & pasting easier). You can optionally mark the delimited block for Pandoc to syntax highlight it: ~~~python import time # Quick, count to ten! for i in range(10): # (but not *too* quick) time.sleep(0.5) print(i) ~~~ ### An h3 header ### Now a n…