Skip to content

Instantly share code, notes, and snippets.

@mattbell87
mattbell87 / server.js
Last active February 24, 2020 07:41
Download CouchDB(PouchDB) database documents as excel file
const express = require("express");
const fs = require('fs');
const expressPouchDB = require("express-pouchdb");
const PouchDB = require("pouchdb");
const ExcelJS = require('exceljs');
const moment = require('moment');
const app = express();
const port = 8080;
@mattbell87
mattbell87 / line.sh
Last active February 6, 2020 02:49
BASH: Print a line across the screen
#!/bin/bash
printf '=%.0s' $(seq 1 $(tput cols))
@mattbell87
mattbell87 / docker-compose.md
Created November 5, 2019 09:43
Docker Compose on Raspbian

Installling Docker-Compose on Rasbian

In order to get the latest Docker Compose to work on my Raspbery Pi 3 running Raspbian (OSMC) I had to follow these steps:

  1. sudo apt-get install build-essential libssl-dev libffi-dev python3-dev
  2. sudo pip3 install cryptography
  3. sudo pip3 install docker-compose

Then you can check the version:

  • docker-compose --version
@mattbell87
mattbell87 / README.md
Created October 5, 2019 01:05
Wordpress with Docker Compose

Here's how you can get a wordpress instance running in seconds with Docker and Docker-Compose.

Requirements

  • Docker
  • Docker Compose

Instructions

  1. Create a folder and copy in docker-compose.yml
@mattbell87
mattbell87 / azureap-git.md
Last active March 8, 2025 12:01
Use GIT behind Azure Application Proxy

1. Download the cookies.txt extenstion for chrome

Download here on the chrome web store

2. Log in

Open a browser and log in to your GIT server (eg GitLab). This should give you an Azure login page, afterwards you'll be logged in to your server.

3. Download your cookies

@mattbell87
mattbell87 / Using VSCode with Unity.md
Last active January 18, 2019 01:17
Using VSCode with Unity
@mattbell87
mattbell87 / create-mysql.bash
Last active May 7, 2024 01:07 — forked from omeinusch/create-mysql.bash
Simple bash script to create mysql db, user with generated password
#!/bin/bash
echo "Creating MySQL user and database"
PASS=$2
if [ -z "$2" ]; then
PASS=`openssl rand -base64 8`
fi
mysql -u root <<MYSQL_SCRIPT
CREATE DATABASE $1;
CREATE USER '$1'@'localhost' IDENTIFIED BY '$PASS';
@mattbell87
mattbell87 / hello.py
Last active August 24, 2017 06:46
My first python app
class Person:
name = ""
def __init__ (self, name):
self.name = name
def sayHi(self):
print("Hello, my name is {}").format(self.name)
def countTo(self, number):
@mattbell87
mattbell87 / iptables.md
Last active December 22, 2023 20:25
IPtables for routing over OpenVPN on Linux

Enable forwarding:

sysctl -w net.ipv4.ip_forward=1

Create this script eg sudo nano iptables.sh

eth=$1
proto=$2
@mattbell87
mattbell87 / Ironkey Fedora.sh
Created July 21, 2016 00:54
Install Ironkey on Fedora
#!/bin/bash
sudo dnf install glibc.i686
sudo dnf install libgcc_s.so.1