Skip to content

Instantly share code, notes, and snippets.

View agyemanjp's full-sized avatar

James A. Prempeh agyemanjp

View GitHub Profile
@agyemanjp
agyemanjp / pd2htmlEX.Ubuntu16.sh
Created May 20, 2016 00:09
pdf2htmlEX install shell script for Ubuntu 16.04, using latest sources
#!/bin/bash
# pdf2htmlEX install shell script for Ubuntu 16.04, using latest sources
# Created by James A. Prempeh ( github.com/prmph )
HOME_PATH=$(cd ~/ && pwd)
LINUX_ARCH="$(lscpu | grep 'Architecture' | awk -F\: '{ print $2 }' | tr -d ' ')"
POPPLER_SOURCE="https://poppler.freedesktop.org/poppler-0.43.0.tar.xz"
FONTFORGE_SOURCE="https://github.com/fontforge/fontforge.git"
PDF2HTMLEX_SOURCE="https://github.com/coolwanglu/pdf2htmlEX.git"
@agyemanjp
agyemanjp / hypothesize-setup-ubuntu-1804.sh
Last active April 30, 2023 10:48
cd ~/ && wget -O hypothesize.sh http://bit.ly/3KlasQ7 && chmod +x hypothesize.sh && ./hypothesize.sh
#!/usr/bin/env bash
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
NOCOLOR='\033[0m'
# Install useful base packages
echo -e "\n${YELLOW}Installing base packages ...${NOCOLOR}"
sudo apt update
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
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
@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
@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 / 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 / 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",
{
"$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 / 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