Value | Color |
---|---|
\e[0;30m | Black |
\e[0;31m | Red |
\e[0;32m | Green |
\e[0;33m | Yellow |
\e[0;34m | Blue |
\e[0;35m | Purple |
Discover gists
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
/** | |
* Different case matchers | |
* | |
* @see <a href="https://en.wikipedia.org/wiki/Naming_convention_(programming)#Examples_of_multiple-word_identifier_formats">Examples of multiple word identifier formats</ | |
*/ | |
sealed class CaseMatcher(private val regex: Regex) { | |
open fun notMatches(source: String?): Boolean { | |
return !matches(source) | |
} |
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
#!/usr/bin/env bash | |
# Abort sign off on any error | |
set -e | |
# Start the benchmark timer | |
SECONDS=0 | |
# Repository introspection | |
OWNER=$(gh repo view --json owner --jq .owner.login) |
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
variables: | |
DOCKER_DRIVER: overlay2 | |
DOCKER_HOST: tcp://docker:2375/ | |
DOCKER_BUILDKIT: 1 | |
build: | |
stage: build | |
services: | |
- name: docker:dind | |
command: ["dockerd", "--host=tcp://0.0.0.0:2375"] |
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
# Replace! | |
# [!server!] (the forge server instance) | |
# [!sudo_password!] (random password for sudo) | |
# [!db_password!] (random password for database user) | |
# [!user.name!] (git user name) | |
# [!user.email!] (git user email) | |
# [!server_ip!] (git user email) | |
# | |
# REQUIRES: |
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
random = function(length) { | |
var array = new Uint16Array(length); | |
window.crypto.getRandomValues(array); | |
var str = ''; | |
for (var i = 0; i < array.length; i++) { | |
str += String.fromCharCode(array[i]); | |
}; | |
return str; | |
} |
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> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Colorable Grid</title> | |
<style> | |
#grid-container { | |
margin: 0 0; | |
padding: 0 0; |
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
#!/bin/bash | |
cd ~ | |
sudo apt-get update | |
sudo apt-get install curl git cmake libusb-1.0-0.dev build-essential | |
cat <<EOF >no-rtl.conf | |
blacklist dvb_core | |
blacklist dvb_usb_rtl28xxu |
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> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<!-- https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP --> | |
<meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'"> | |
<link href="./styles.css" rel="stylesheet"> | |
<title>Hello World!</title> | |
</head> | |
<body> |
NewerOlder