A list of code blocks from many languages to, for example, test a custom theme and see how it renders the code for each language.
#!/bin/bash| variable "docker_password" {} | |
| data "kubernetes_all_namespaces" "allns" {} | |
| resource "kubernetes_secret" "docker_secrets" { | |
| for_each = toset(data.kubernetes_all_namespaces.allns.namespaces) | |
| metadata { | |
| name = "gitlab-cloud" | |
| namespace = each.value | |
| } |
| #!/usr/bin/env bash | |
| check_connection() { | |
| PID=$(echo "$1" | awk '{print $1}') | |
| SOURCE=$(echo "$1" | awk '{print $2}') | |
| SOURCE_STATUS=$(curl --silent --fail "$SOURCE" --max-time 1 > /dev/null) | |
| # Status code returned when a timeout occurs | |
| if [[ $? -eq 28 ]]; then |
| .table-wrapper { | |
| overflow: auto; | |
| padding-top: 10px; | |
| padding-bottom: 10px; | |
| } |
| #include "helpers.h" | |
| #include <stdio.h> | |
| #include <math.h> | |
| // Convert image to grayscale | |
| void grayscale(int height, int width, RGBTRIPLE image[height][width]) | |
| { | |
| for (int i = 0; i < height; i++) | |
| { | |
| for (int j = 0; j < width; j++) |
| #include <cs50.h> | |
| #include <stdio.h> | |
| #include <string.h> | |
| // Max number of candidates | |
| #define MAX 9 | |
| // Candidates have name and vote count | |
| typedef struct | |
| { |
| #include <cs50.h> | |
| #include <stdio.h> | |
| #include <string.h> | |
| #include <ctype.h> | |
| int main(int argc, string argv[]) | |
| { | |
| // the user must provide one and only argument | |
| if (argc != 2) | |
| { |
| # EditorConfig is awesome: http://EditorConfig.org | |
| # https://github.com/jokeyrhyme/standard-editorconfig | |
| # top-most EditorConfig file | |
| root = true | |
| # defaults | |
| [*] | |
| charset = utf-8 |
| FROM ruby:2.7.1-slim AS base | |
| LABEL maintainer="Yann Defretin <[email protected]" | |
| # Common dependencies | |
| RUN apt-get update -qq \ | |
| && DEBIAN_FRONTEND=noninteractive apt-get install -yq \ | |
| --no-install-recommends \ | |
| build-essential=12.6 \ | |
| gnupg2=2.2.12-1+deb10u1 \ |
| import requests | |
| from bs4 import BeautifulSoup | |
| import time | |
| import pandas as pd | |
| import random | |
| from urllib.parse import urlsplit | |
| stories_cols = ['title', 'story'] | |
| csv_stories = pd.DataFrame(columns=stories_cols) |