Standard escape codes are prefixed with Escape
:
- Ctrl-Key:
^[
- Octal:
\033
- Unicode:
\u001b
- Hexadecimal:
\x1B
- Decimal:
27
javascript: Promise.all([import('https://unpkg.com/turndown@6.0.0?module'), import('https://unpkg.com/@tehshrike/readability@0.2.0'), ]).then(async ([{ | |
default: Turndown | |
}, { | |
default: Readability | |
}]) => { | |
/* Optional vault name */ | |
const vault = ""; | |
/* Optional folder name such as "Clippings/" */ |
# Stick this in your home directory and point your Global Git config at it by running: | |
# | |
# $ git config --global core.attributesfile ~/.gitattributes | |
# | |
# See https://tekin.co.uk/2020/10/better-git-diff-output-for-ruby-python-elixir-and-more for more details | |
*.c diff=cpp | |
*.h diff=cpp | |
*.c++ diff=cpp | |
*.h++ diff=cpp |
namespace :solargraph do | |
task generate: :environment do | |
# Add the folder you choose in your config/application.rb | |
# example: | |
# config.autoload_paths << Rails.root.join('app/solargraph') | |
gen_directory = Rails.root.join("config", "yard") | |
# run the script as a rails runner: | |
# jundle exec rails r ./bin/generate_solar_models.rb |
import SwiftUI | |
import Combine | |
struct HMS { | |
var h: Int | |
var m: Int | |
var s: Int | |
} | |
struct ContentView: View { |
#!/bin/bash | |
# Assumes you have a DIGITALOCEAN_TOKEN env var pre-set | |
# Assumes you have terraform and mutagen installed | |
# Assumes DO has an SSH key uploaded | |
DO_REGION="sgp1" # Set to DO region: https://www.digitalocean.com/docs/platform/availability-matrix/ | |
SSH_KEY_FINGERPRINT="your-key-fingerprint" # You can find this in your control panel | |
if [ -z $DIGITALOCEAN_TOKEN ]; then | |
exit 1 |
{ | |
"name": "rsms dark v2 mono", | |
"author": "rsms", | |
"variables": { | |
"red": "hsl(5, 0%, 50%)", | |
"orange": "hsl(27, 0%, 50%)", | |
"yellow": "hsl(60, 0%, 50%)", | |
"green": "hsl(150, 0%, 43%)", | |
"cyan": "hsl(180, 0%, 50%)", | |
"blue": "hsl(210, 0%, 50%)", |
# The following comments fill some of the gaps in Solargraph's understanding of | |
# Rails apps. Since they're all in YARD, they get mapped in Solargraph but | |
# ignored at runtime. | |
# | |
# You can put this file anywhere in the project, as long as it gets included in | |
# the workspace maps. It's recommended that you keep it in a standalone file | |
# instead of pasting it into an existing one. | |
# | |
# @!parse | |
# class ActionController::Base |
require 'pry' | |
require 'json' | |
require 'uri' | |
module Application | |
class NginxLogParser | |
DEFAULT_FORMAT_REGEXP = /(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})\s?\-\s?-\s?\[(\d{2}\/[a-z]{3}\/\d{4}:\d{2}:\d{2}:\d{2} (\+|\-)\d{4})\]\s?\\?"?(GET|POST|PUT|HEAD|DELETE|OPTIONS)\s?(.*?)\s(HTTP\/\d\.\d)\\?"?\s?(\d{3})\s?(\d+)\s?\\?\"\-\\?\"\s?\\?\"(.*?)\"/i | |
REQUEST_FORMAT = [ |