Skip to content

Instantly share code, notes, and snippets.

View agyemanjp's full-sized avatar

James A. Prempeh agyemanjp

View GitHub Profile
# See https://docs.posit.co/resources/install-r-source/
sudo apt install -y \
gfortran g++ \
curl libcurl4-openssl-dev \
libicu-dev \
libbz2-dev \
liblzma-dev \
libpcre2-dev \
libpcre3-dev &&\
# libpango1.0-dev \
@agyemanjp
agyemanjp / init-ci-ubuntu18.sh
Last active April 30, 2023 10:51
Initialize (or fix) CI Server for Hypothesize
#!/bin/bash
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[0;33m'
NOCOLOR='\033[0m'
sudo apt install -y swapspace build-essential
if [ ! -x "$(command -v git)" ]; then
@agyemanjp
agyemanjp / hypothesize-ubuntu-20-setup.sh
Last active March 29, 2023 18:22
cd ~/ && wget -O hypothesize.sh http://bit.ly/40sm6hA && chmod +x hypothesize.sh && ./hypothesize.sh
#!/usr/bin/env bash
RED='\033[0;31m'
GREEN='\033[0;32m'
NOCOLOR='\033[0m'
# Install useful base packages
echo -e "\n${GREEN}Installing base packages ...${NOCOLOR}"
sudo apt update
sudo apt install -y build-essential
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "http://danfortsystems.com/schemas/appgen.json",
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Name of app"
},
"owner": {
@agyemanjp
agyemanjp / code-check-general.schema.json
Last active July 31, 2020 12:04
Schema for standard CI code checks output
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Name of code check"
},
"description": {
"type": "string",
@agyemanjp
agyemanjp / initial-server-seup.ubuntu-18-04.sh
Created July 4, 2020 14:18
Initial basic server setup (users, SSH, UFW, etc.) script for Ubuntu 18.04
#!/bin/bash
set -euo pipefail
########################
### SCRIPT VARIABLES ###
########################
# Name of the user to create and grant sudo privileges
USERNAME=sammy
@agyemanjp
agyemanjp / virtualbox-additions-install-ubuntu.sh
Last active June 22, 2019 16:29
Install VirtualBox additions on Ubuntu 18 guest OS
sudo -i
apt install gcc make
mkdir -p /media/cdrom
mount /dev/cdrom /media/cdrom
/media/cdrom/VBoxLinuxAdditions.run
reboot
# After reboot:
sudo usermod --append --groups vboxsf $(whoami)
@agyemanjp
agyemanjp / ufw-install-config.sh
Created June 22, 2019 15:35
Install and configure UFW (Uncomplicated Firewall) on Ubuntu 18.04
sudo apt install ufw -y
sudo ufw enable
# sudo ufw default deny
sudo ufw default deny incoming
sudo ufw default allow outgoing
# Allow common apps
sudo ufw allow ssh
sudo ufw allow Samba
sudo apt update
sudo apt install samba cifs-utils
echo "" | sudo tee -a /etc/samba/smb.conf
echo "[Code]" | sudo tee -a /etc/samba/smb.conf
echo " comment = CODE FOLDER" | sudo tee -a /etc/samba/smb.conf
echo " path = ~/code" | sudo tee -a /etc/samba/smb.conf
echo " read only = no" | sudo tee -a /etc/samba/smb.conf
# echo " guest ok = yes" | sudo tee -a /etc/samba/smb.conf
REM Install useful packages
echo( & echo Installing chocolatey ...
@"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"
refreshenv
echo( & echo Installing wget ...
choco install wget -y
refreshenv