这个徽章需要由你在 Discussion Q&A 中回答别人的问题,并且由 OP(不能是你自己)mark as answer 才能获得。需要至少回答两个问题。
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
#include <iostream> | |
#include <chrono> | |
#include <sstream> | |
using namespace std; | |
using namespace chrono; | |
// Method 1: Using a conditional operator | |
string bool_to_string_conditional(bool b) { | |
return b ? "true" : "false"; |
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
package main | |
import "github.com/gin-gonic/gin" | |
func main() { | |
r := gin.Default() | |
r.GET("/users/:name", func(c *gin.Context) {}) | |
// can't use `:id` here, change to `:name` will fix the confliction | |
r.GET("/users/:id/repos", func(c *gin.Context) {}) | |
_ = r.Run(":8080") |
Helper script to map ports to other servers.
had a database that was only accesible in the VPC on aws, so i created an dev intance and did a ssh tunnel to that dev instance with netcat mapping the port to the database
Forward all request from local 5432 to remote host google.com port 80
./nc-proxy.sh 5432 google.com 80
Helper script to map ports to other servers.
had a database that was only accesible in the VPC on aws, so i created an dev intance and did a ssh tunnel to that dev instance with netcat mapping the port to the database
Forward all request from local 5432 to remote host google.com port 80
./nc-proxy.sh 5432 google.com 80
OlderNewer