Obtained using:
$ cat <<EOF > main.go
> package main
import "fmt"
func main() {
fmt.Println("vim-go")
}
provisioner "file" { | |
@@ -115,96 +115,150 @@ Name = ${element(null_resource.server_names_tinc.*.triggers.name, count.index)} | |
Device = /dev/net/tun | |
AddressFamily = ipv4 | |
BindToAddress = ${element(hcloud_server.servers.*.ipv4_address, count.index)} | |
-${replace(join("\n", formatlist("ConnectTo = %s", split(" ", replace(replace(replace(replace(replace(replace(join(",", null_resource.server_names.*.triggers.name), element(null_resource.server_names.*.triggers.name, count.index), ""), ",,", ","), ".${var.domain}", ""), "-", "_"), ",", " "), "/(^ | $)/", "")))), "/^ConnectTo = $/", "")} | |
+${replace( | |
+join( | |
+"\n", | |
+formatlist( |
package main | |
import ( | |
"fmt" | |
"time" | |
) | |
// hoursSince returns how many hours passed from given date. | |
// for Time 0 (time.Time{}), it returns 0. | |
func hoursSince(d time.Time) int { |
package main | |
import ( | |
"fmt" | |
"reflect" | |
"regexp" | |
"sort" | |
) | |
func main() { |
Vagrant.configure("2") do |config| | |
config.vm.box = "ubuntu/bionic64" | |
config.disksize.size = '30GB' | |
config.vm.provider :virtualbox do |v| | |
v.check_guest_additions = false | |
v.functional_vboxsf = false | |
v.cpus = 2 | |
v.memory = 2048 |
#!/bin/bash | |
NOTIFICATIONS_COUNT=0 | |
NOTIFICATIONS_URL=https://github.com/notifications | |
ICONS_DIR=~/.cache/githubstatus-indicator | |
ICONS_SIZE=32 | |
TEXT="No new notifications." | |
GITHUB_USERNAME=$(yq -r '.hosts["github.com"].user' ~/.config/gh/config.yml) | |
GITHUB_TOKEN=$(yq -r '.hosts["github.com"].oauth_token' ~/.config/gh/config.yml) |
// Run using 'gcc main.c -g -O2 -pedantic -o main $(pkg-config gtk+-3.0 --cflags) && ./main' | |
#include <gdk/gdk.h> | |
#include <time.h> | |
#include <assert.h> | |
#include <limits.h> | |
static int hview_time_to_string(char *str, size_t maxsize, time_t time) { | |
struct tm *tm = gmtime(&time); |
#!/bin/bash | |
if [[ "$#" -ne 1 ]]; then | |
echo "Wrong number of arguments, expected 1, got $#." | |
exit 1 | |
fi | |
CONTEXT_NAME=$1 | |
KUBECONFIG="${KUBECONFIG:-~/.kube/config}" |
package main | |
import ( | |
"compress/gzip" | |
"io" | |
"log" | |
"os" | |
) | |
func main() { |
Obtained using:
$ cat <<EOF > main.go
> package main
import "fmt"
func main() {
fmt.Println("vim-go")
}
{ | |
"defaultAction": "SCMP_ACT_ERRNO", | |
"syscalls": [ | |
{ | |
"names": [ | |
// Used by Go binary. | |
"arch_prctl", | |
"clone", | |
"close", | |
"execve", |