Skip to content

Instantly share code, notes, and snippets.

(def my-ref (ref "immutable data"))
; #'user/my-ref
my-ref
; #<ref@18352d8: "immutable data">
@my-ref
; "immutable data"
(deref my-ref)
; "immutable data"
public class HistoryRecord {
@JsonProperty("opcRequestID")
private String id;
@JsonProperty("namespaceName")
private String namespaceName;
@JsonProperty("bucketName")
private String bucketName;
// Rest of the class is ommitted.
}
<!DOCTYPE html>
<html>
<head>
<title>https://sw-samuraj.cz/index.xml</title>
<link rel="canonical" href="https://sw-samuraj.cz/index.xml"/>
<meta name="robots" content="noindex">
<meta http-equiv="content-type" content="application/rss+xml; charset=utf-8"/>
<meta http-equiv="refresh" content="0; url=https://sw-samuraj.cz/index.xml"/>
</head>
</html>
scrape_configs:
- job_name: 'oci-sd'
scrape_interval: 5s
file_sd_configs:
- files:
- oci-sd.json
refresh_interval: 1m
relabel_configs:
- source_labels: ['__meta_oci_public_ip']
target_label: '__address__'
[
{
"targets": [
"10.1.0.3:9100"
],
"labels": {
"__meta_oci_availability_domain": "YHQr:PHX-AD-3",
"__meta_oci_compartment_id": "ocid1.compartment.oc1..aaaaaaaa7gna34n3semxsi7ejf72jqpjnip6mqw2764hegwp7y2sl5rctdqa",
"__meta_oci_freeform_tag_prometheus_exporter": "node_exporter",
"__meta_oci_instance_id": "ocid1.instance.oc1.phx.abyhqljsjcdozybjh33phjwxzxfpjnqjvwtaltx7jneccjjuqumfdbk76dyq",
[SDConfig]
User = "ocid1.user.1"
FingerPrint = "42:42:42"
KeyFile = "/home/<user>/.oci/oci_api_key.pem"
PassPhrase = "secret"
Tenancy = "ocid1.tenancy.1"
Region = "us-phoenix-1"
Compartment = "ocid1.compartment.1"
### Authentication details
export TF_VAR_tenancy_ocid="<tenancy OCID>"
export TF_VAR_user_ocid="<user OCID>"
export TF_VAR_private_key_path="<path to the private key that matches the fingerprint above>"
export TF_VAR_fingerprint="<PEM key fingerprint>"
# export TF_VAR_pass_phrase="<private key pass phrase>""
### Region
export TF_VAR_region="<region in which to operate, example: us-ashburn-1, us-phoenix-1>"
@sw-samuraj
sw-samuraj / hugo-gitlab-ci.yml
Created October 7, 2018 19:44
CI/CD configuration for publishing of GitLab Pages via Hugo.
image: registry.gitlab.com/pages/hugo:latest
variables:
GIT_SUBMODULE_STRATEGY: recursive
pages:
script:
- hugo
artifacts:
paths:
package main
import (
"fmt"
"time"
)
func main() {
for i := 0; i <= 9; i++ {
i := i // Seems odd, but it's legal and idiomatic.
package main
import (
"fmt"
"time"
)
func main() {
for i := 0; i <= 9; i++ {
go func() { fmt.Println(i) }()