You can post a json file with curl
like so:
curl -X POST -H "Content-Type: application/json" -d @FILENAME DESTINATION
so for example:
OUT := binariy-name | |
PKG := gitlab.com/group/project | |
VERSION := $(shell git describe --always --long --dirty) | |
PKG_LIST := $(shell go list ${PKG}/... | grep -v /vendor/) | |
GO_FILES := $(shell find . -name '*.go' | grep -v /vendor/) | |
all: run | |
server: | |
go build -i -v -o ${OUT} -ldflags="-X main.version=${VERSION}" ${PKG} |
package main | |
import ( | |
"encoding/json" | |
"io/ioutil" | |
"net/http" | |
"os" | |
"regexp" | |
"time" | |
) |
git config url."git@github.com-public".insteadOf "https://github.com" | |
# Credit: | |
# | |
# https://medium.com/cloud-native-the-gathering/go-modules-with-private-git-repositories-dfe795068db4 |
$ java -jar epubcheck.jar For\ The\ Love\ of\ Go\ -\ Data.epub
Validating using EPUB version 3.2 rules.
ERROR(RSC-007): For The Love of Go - Data.epub/EPUB/styles/stylesheet1.css(8,3): Referenced resource "EPUB/styles/fonts/SourceSerifPro-Regular.ttf" could not be found in the EPUB.
ERROR(RSC-007): For The Love of Go - Data.epub/EPUB/styles/stylesheet1.css(19,3): Referenced resource "EPUB/styles/fonts/RobotoSlab-VariableFont_wght.ttf" could not be found in the EPUB.
package main | |
import ( | |
"bufio" | |
"fmt" | |
"os" | |
"strings" | |
) | |
func main() { |
package main | |
import ( | |
"fmt" | |
"log" | |
"github.com/go-ldap/ldap/v3" | |
) | |
const ( |
package main | |
import ( | |
"context" | |
"encoding/json" | |
"flag" | |
"fmt" | |
"os" | |
"strings" | |
"text/tabwriter" |
You are working on a Rails app that uses a gem named abc
. This gem is hosted on RubyGems and the source code of the gem is available at https://github.com/your-username/abc.
You created a new branch locally for your gem (new-feature
). You wanted to modify the gem and load it directly to your local Rails app. And, you don't want to push the gem changes to GitHub and publish the gem to RubyGems just yet.
You want all the changes that you made in your local gem directory get reflected immediately in your local Rails app without requiring you to run gem build
and gem install
command in the gem's local directory.