(wherever it says url.com, use your server's domain or IP)
Login to new server as root, then add a deploy user
sudo useradd --create-home -s /bin/bash deploy
sudo adduser deploy sudo
sudo passwd deploy
And Update the new password
### Keybase proof | |
I hereby claim: | |
* I am profclems on github. | |
* I am profclems (https://keybase.io/profclems) on keybase. | |
* I have a public key whose fingerprint is 2F9B 07FA E6FC B18C FE5F F274 E661 628E 23FB 5816 | |
To claim this, I am signing this object: |
(wherever it says url.com, use your server's domain or IP)
Login to new server as root, then add a deploy user
sudo useradd --create-home -s /bin/bash deploy
sudo adduser deploy sudo
sudo passwd deploy
And Update the new password
This guide features glab
, an open-source GitLab CLI tool I maintain.
In this quickstart guide, you’ll learn glab
: find out what the tool is used for, how to set it up, and how to use it.
If you’re a GitLab user, you’re obviously aware that you need to switch to the web browser in order to perform various actions like creating issues, merge requests, viewing pipeline logs, etc on your GitLab repository.
With the glab
, you can execute many of these actions without leaving the command-line interface.
glab
#!/bin/sh | |
set -e | |
if [[ $(id -u) -ne 0 ]] ; then echo "Please run as root" ; exit 1 ; fi | |
echo "Setting up Noto Emoji font..." | |
# 1 - install noto-fonts-emoji package | |
pacman -S noto-fonts-emoji --needed | |
# pacman -S powerline-fonts --needed | |
echo "Recommended system font: inconsolata regular (ttf-inconsolata or powerline-fonts)" | |
# 2 - add font config to /etc/fonts/conf.d/01-notosans.conf | |
echo "<?xml version=1.0?> |
package main | |
import ( | |
"encoding/csv" | |
"fmt" | |
"net/http" | |
) | |
func readCSVFromUrl(url string) ([][]string, error) { | |
resp, err := http.Get(url) |
func openbrowser(url string) { | |
var err error | |
switch runtime.GOOS { | |
case "linux": | |
err = exec.Command("xdg-open", url).Start() | |
case "windows": | |
err = exec.Command("rundll32", "url.dll,FileProtocolHandler", url).Start() | |
case "darwin": | |
err = exec.Command("open", url).Start() |
Example inputs:
Variable | Value |
---|---|
key | the shared secret key here |
message | the message to hash here |
Reference outputs for example inputs above:
| Type | Hash |
#!/usr/bin/env bash | |
# Based on https://gist.github.com/eduncan911/68775dba9d3c028181e4 | |
# but improved to use the `go` command so it never goes out of date. | |
type setopt >/dev/null 2>&1 | |
contains() { | |
# Source: https://stackoverflow.com/a/8063398/7361270 | |
[[ $1 =~ (^|[[:space:]])$2($|[[:space:]]) ]] |