Skip to content

Instantly share code, notes, and snippets.

@mattstein
mattstein / db-test.php
Created Aug 28, 2020
PHP MySQL/PostgreSQL Connection Test
View db-test.php
<?php
/**
* Database Connection Tester
* A quick-and-dirty standalone script for checking PHP’s connection to a
* MySQL (or MariaDB) or PostgreSQL database.
*
* To use, enter the settings below and run the following from your terminal:
* ```
* php -f db-test.php
View deploy.php
<?php
namespace Deployer;
require 'recipe/common.php';
require 'recipe/rsync.php';
set('application', 'workingconcept/wrkcpt-craft');
set('repository', 'https://github.com/workingconcept/wrkcpt-craft');
$shared = [
View deploy.yml
name: Forge Deploy
on:
push:
branches:
# - master
- develop
jobs:
deploy:
View keybase.md

Keybase proof

I hereby claim:

  • I am mattstein on github.
  • I am mattstein (https://keybase.io/mattstein) on keybase.
  • I have a public key ASDwLlks6Mvqiz48RjCBpsDYvi17-xvDTKdtJSiAnS6Bzwo

To claim this, I am signing this object:

@mattstein
mattstein / update-fathom.sh
Created Dec 16, 2018
Shell script for updating fathom analytics binary on Centmin Mod linux.
View update-fathom.sh
#!/bin/bash
CUR_VERSION="$(fathom version | cut -d' ' -f3)"
NEW_VERSION="$(curl -s https://api.github.com/repos/usefathom/fathom/releases/latest | grep tag_name | cut -d'v' -f2 | cut -d'"' -f1)"
echo "Current Version: $CUR_VERSION => New Version: $NEW_VERSION"
if [ "$NEW_VERSION" != "$CUR_VERSION" ]; then
echo "Installing version ${NEW_VERSION}..."