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 deno run --allow-run --allow-read --allow-env | |
| /** | |
| * @module run-cursor-dev-container | |
| * @fileoverview Generic Cursor Dev Container Launcher | |
| * | |
| * Automates the process of launching Cursor directly into any dev container, | |
| * bypassing the need for manual "Reopen in Container" command palette actions. | |
| * | |
| * @description This script manages Docker container lifecycle and constructs the proper |
Convert RMarkdown (.Rmd) to JDF PDF Files with a VSCode devcontainer
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
| import requests, json | |
| #Notion's token and databaseId | |
| token = 'XXX' | |
| databaseId = 'XXX' | |
| #Notion's headers | |
| headers = { | |
| "Authorization": "Bearer " + token, | |
| "Content-Type": "application/json", |
If you don't know what Wireguard is, well, you should. It's fast, easy to setup and highly configurable. We will configure Wireguard for multiple users with various restrictions using iptables.
This should fit most setups (not mine though π)
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
| <?xml version="1.0" encoding="UTF-8"?> | |
| <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
| <modelVersion>4.0.0</modelVersion> | |
| <parent> | |
| <groupId>io.plan.bofime</groupId> | |
| <artifactId>swim-common-parent</artifactId> | |
| <version>1.0-SNAPSHOT</version> | |
| </parent> |
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
| import json | |
| import sys | |
| # λλ νμ΄ν°μ μ°Έκ°νκΈ° μν΄μλ μμ΄μ νΈλ₯Ό λ§λ€μ΄μ μ μΆν΄ μ£Όμ μΌ ν©λλ€. | |
| # μμ΄μ νΈλ μ¬μ©μκ° μμ±νλ μΈκ³΅μ§λ₯ μ½λλ‘μ, μ£Όμ΄μ§λ νμ¬ κ²μ μνλ₯Ό λ°νμΌλ‘ | |
| # μ΄λ€ μ‘μ μ μ·¨ν μ§λ₯Ό κ²°μ νλ μν μ ν©λλ€. | |
| # | |
| # μ‘μ μ€λͺ | |
| # - idle - μ무κ²λ νμ§ μμ΅λλ€. | |
| # - forward - μμΌλ‘ μμ§μ λλ€. μλκ° λ°λ‘ μμ μμ κ²½μ° λ μμ§μ΄μ§ μμ΅λλ€. |
This is a sample script for copying values from JSON to a struct using reflect package.
package main
import (
"encoding/json"
"fmt"
See this issue.
Docker best practise to Control and configure Docker with systemd.
-
Create
daemon.jsonfile in/etc/docker:{"hosts": ["tcp://0.0.0.0:2375", "unix:///var/run/docker.sock"]}
Starting with 1.12 in July 2016, Docker Swarm Mode is a built-in solution with built-in key/value store. Easier to get started, and fewer ports to configure.
- TCP port 2377 for cluster management & raft sync communications
- TCP and UDP port 7946 for "control plane" gossip discovery communication between all nodes
- UDP port 4789 for "data plane" VXLAN overlay network traffic
- IP Protocol 50 (ESP) if you plan on using overlay network with the encryption option
NewerOlder