The following content shows a general structure of a web app, it can be changed based on the different conventions of web frameworks.
- templates (views) # Template files
package router | |
import ( | |
"encoding/json" | |
"html/template" | |
"io/fs" | |
"net/http" | |
) | |
var commonMiddleware = []Middleware{} |
""" | |
A build script for golang projects | |
""" | |
APP_NAME=<your app name here> | |
if [[ $(uname -m) == "x86_64" ]]; then | |
APP_ARCH=amd64 | |
elif [[ $(uname -m) == "i686" ]]; then | |
APP_ARCH=386 | |
elif [[ $(uname -m) == "arm64" ]]; then |
traefik.frontend.auth.basic.users: | |
echo $(htpasswd -nbB username "passwort") | sed -e s/\\$/\\$\\$/g |
The following content shows a general structure of a web app, it can be changed based on the different conventions of web frameworks.
- templates (views) # Template files
This will guide you through setting up a replica set in a docker environment using.
Thanks to https://gist.github.com/asoorm for helping with their docker-compose file!
sudo su | |
# In case of TinkerBoard, use the `tinker-config` alternative to the rpi's raspi-config | |
wget https://raw.githubusercontent.com/mikerr/tinker-config/master/tinker-config | |
# Enable multiverse repository | |
sed -i "/^# deb.*multiverse/ s/^# //" /etc/apt/sources.list | |
apt-get update | |
apt-get upgrade -y |
/** If you want to use the local development environment with the dev backend, | |
* this will create a proxy so you won't run into CORS issues. | |
* It accepts the following command line parameters: | |
* - port the port where the proxy will listen | |
* - target the DEV backend target to contact. | |
* Example: If you set the port to 3000 and target to https://dev.nibo.ai then | |
* your actual "resourceBaseUrl" in NiboSettings should be http://localhost:3000/api/v1 | |
*/ | |
// Define the command line options | |
const optionDefinitions = [ |
git log --all --grep="search text" |
axios({ | |
url: 'http://localhost:5000/static/example.pdf', | |
method: 'GET', | |
responseType: 'blob', // important | |
}).then((response) => { | |
const url = window.URL.createObjectURL(new Blob([response.data])); | |
const link = document.createElement('a'); | |
link.href = url; | |
link.setAttribute('download', 'file.pdf'); | |
document.body.appendChild(link); |
import React from 'react'; | |
import { Router } from 'react-router-dom'; | |
import createBrowserHistory from 'history/createBrowserHistory'; | |
const LOCATION_CHANGE = '@@router/LOCATION_CHANGE'; | |
export const history = createBrowserHistory(); | |
class ReduxRouter extends React.Component { | |
static propTypes = { |