Skip to content

Instantly share code, notes, and snippets.

View theconsolelogger's full-sized avatar

The Console Logger theconsolelogger

View GitHub Profile
@theconsolelogger
theconsolelogger / setup-ubuntu.md
Created August 20, 2020 05:37
Guide to setting up a new Ubuntu installation.

Setup Ubuntu

sudo apt update sudo apt upgrade

sudo apt install build-essential zlib1g-dev libssl-dev libbz2-dev libsqlite3-dev libreadline-dev python3-distutils curl git vim

Pyenv

curl https://pyenv.run | bash

bashrc:

@theconsolelogger
theconsolelogger / setup-macos.md
Last active July 8, 2020 02:15
Instructions on setting up the development environment for a fresh macOS Catalina instance.
@theconsolelogger
theconsolelogger / change-enum.php
Created April 12, 2020 03:17
An example of how to update a Laravel enum column with a migration script.
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Schema;
class ChangeEnum extends Migration
{
/**
@theconsolelogger
theconsolelogger / request-progress-bars-listeners.html
Last active June 23, 2022 04:31
Two examples of how to monitor the upload and download progress a HTTP request, created from a form with a file, and display it as a progress bar.
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">
</head>

Keybase proof

I hereby claim:

  • I am jonathanstaniforth on github.
  • I am jonstaniforth (https://keybase.io/jonstaniforth) on keybase.
  • I have a public key ASB4yfOU1bTQ538XgCYgCl-U771aenjaSRvTwl66MtisFAo

To claim this, I am signing this object:

@theconsolelogger
theconsolelogger / Telegram.php
Created November 23, 2019 05:45
A PHP class that can be used in a Laravel project to send response messages to the Telegram Bot API.
<?php
namespace App\Helpers;
use GuzzleHttp\Client;
class Telegram
{
private $chat_id;
private $message_id;
@theconsolelogger
theconsolelogger / docker-compose-laravel-postgresql.yml
Last active October 19, 2019 08:55
A Docker Compose file for running a Laravel Docker image with a PostgreSQL database.
version: "3.7"
services:
api:
image: docker.pkg.github.com/jonathanstaniforth/laravel-docker/laravel-postgresql:v1.1
ports:
- 80:80
- 443:443
volumes:
- ./:/var/www/laravel
depends_on:
@theconsolelogger
theconsolelogger / docker-compose-laravel-mysql.yml
Last active October 19, 2019 08:55
A Docker Compose file for running a Laravel Docker image with a MySQL database.
version: "3.7"
services:
api:
image: docker.pkg.github.com/jonathanstaniforth/laravel-docker/laravel-mysql:v1.1
ports:
- 80:80
- 443:443
volumes:
- ./:/var/www/laravel
depends_on: