This file contains hidden or 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
| // Zed keymap | |
| // | |
| // For information on binding keys, see the Zed | |
| // documentation: https://zed.dev/docs/key-bindings | |
| // | |
| // To see the default key bindings run `zed: open default keymap` | |
| // from the command palette. | |
| [ | |
| { | |
| "context": "Editor && vim_mode == insert && showing_completions", |
This file contains hidden or 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
| [Unit] | |
| Description=Livebook Server | |
| After=docker.service | |
| Requires=docker.service | |
| [Service] | |
| User=livebook | |
| Group=livebook | |
| Restart=always | |
| ExecStartPre=-/usr/bin/docker stop livebook |
This file contains hidden or 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
| #let transform(coordinates, x: 0mm, y: 0mm) = { | |
| (coordinates.at(0) + x, coordinates.at(1) + y) | |
| } | |
| #let coordinates(radius, degree) = { | |
| let sin = calc.sin(degree) | |
| let cos = calc.cos(degree) | |
| (radius * sin, radius * cos) | |
| } |
This file contains hidden or 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
| defmodule Util do | |
| @moduledoc """ | |
| This module contains utilities. | |
| """ | |
| @doc """ | |
| Converts the keys of the given map to camelized strings. | |
| ## Examples |
This file contains hidden or 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
| - debug: I try to loop over the top level and the 2nd level | |
| msg: "{{ item.manufacturer }} {{ item.???.carname }} {{ item.???.carattributes }}" | |
| loop: "{{ manufacturers | dict2items(key_name= 'manufacturer') }}" |
This file contains hidden or 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
| defmodule DatabaseServices.CouchDb.DesignDocument do | |
| @moduledoc false | |
| alias DatabaseServices.CouchDb.Document | |
| def put(module, opts \\ []) do | |
| couch_keys = ["_id", "_rev", :_id, :_rev] | |
| view_name = module |> extract_ddoc_name() | |
| id = "/_design/#{view_name}" |
This file contains hidden or 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
| { | |
| "_id": "_design/nvd_1_0", | |
| "id": "_design/nvd_1_0", | |
| "key": "_design/nvd_1_0", | |
| "views": { | |
| "cve_sev": { | |
| "map": "function(doc) {\n // first extract what we want to use\n const vendors = doc.cve &&\n doc.cve.affects &&\n doc.cve.affects.vendor &&\n doc.cve.affects.vendor.vendor_data;\n\n // since we can't be sure vendor_data does exist\n // let's check if it's really an array\n if (Array.isArray(vendors) === false)\n return; // if not just return and proceed with the next document\n\n // iterate through every \"vendor\" in that array\n vendors.forEach(vendor => {\n // let's remember the vendor name\n const vendorName = vendor.vendor_name;\n // let us also unwrap the product_data\n const products = vendor.product &&\n vendor.product.product_data;\n \n // again, if products is no array\n if (Array.isArray(products) === false)\n return; // return and proceed with the next vendor\n \n products.forEach(product => {\n // |
This file contains hidden or 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
| // "A" works | |
| // Supplying a locale has no effect | |
| // Saving the js file as LATIN-x/UTF8 (wo BOM) works | |
| // Saving the js file as UTF8BOM, UTF16LE, UTF16BE does not work | |
| var t = "Ä".toLowerCase("de"); // fails | |
| print(t) | |
| quit(1) |
This file contains hidden or 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
| ; CouchDB Configuration Settings | |
| ; Custom settings should be made in this file. They will override settings | |
| ; in default.ini, but unlike changes made to default.ini, this file won't be | |
| ; overwritten on server upgrade. | |
| [chttpd] | |
| bind_address = any | |
| [httpd] |
This file contains hidden or 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 | |
| set -e | |
| CONTEXT="$1" | |
| if [[ -z ${CONTEXT} ]]; then | |
| echo "Usage: $0 KUBE-CONTEXT" | |
| exit 1 | |
| fi |
NewerOlder