Skip to content

Instantly share code, notes, and snippets.

@Stoyvo
Stoyvo / DockerFile
Last active January 3, 2023 09:56
GCP App Engine PHP 8.1 Flexible Environment
FROM php:8.1.1-fpm-alpine
# HEAVILITY INFLUENCED BY https://github.com/TrafeX/docker-php-nginx
# Without TrafeX repository, I'd still be doing this.
LABEL maintainer="Stoyvo"
# No interative terminals
ENV DEBIAN_FRONTEND noninteractive
# Set timezone to UTC. Just easier that way with most cloud services.
@hurricup
hurricup / install_imagemagic_with_heic.sh
Last active October 29, 2025 21:24
How to install ImageMagick 7.1.0-54 with HEIC and WEBP support on Ubuntu 20.04
# inspired by https://gist.github.com/rjnienaber/af47fccb8410926ba7ea35f96c3b87fd
# remove bundled ImageMagick
sudo apt remove imagemagick -y
# install base dependencies
sudo apt-get install -y \
build-essential \
git \
libde265-dev \
@brokeyourbike
brokeyourbike / cloud-functions-static-outbound-ip.md
Last active April 21, 2024 00:50
Cloud functions static outbound IP address

Cloud functions static outbound IP address

The guide inspired by Static outbound IP address for Cloud Run.

1. Find the name of your VPC network:

gcloud compute networks list
@pavankjadda
pavankjadda / Sonarqube with Postgres database using docker.md
Last active July 9, 2025 07:00
Setup Sonarqube with Postgres database using docker

Setup Sonarqube with Postgres database using docker

Both Sonarqube and Postgres database should be same network in order communicate with each other. First create docker network using the following commands

Create docker network

Delete existing docker network and create new docker network sonarqube

docker network rm sonarqube_network
docker network create sonarqube_network

Run PostGres DB container

@poing
poing / laravel_facades.md
Last active September 6, 2024 14:32
Laravel Facades

Understanding Facades in Laravel

What's a Facade?

The Laravel explination, shown below is confusing.

Facades provide a "static" interface to classes that are available in the application's service container. Laravel ships with many facades which provide access to almost all of Laravel's features. Laravel facades serve as "static proxies" to underlying classes in the service container, providing the benefit of a terse, expressive syntax while maintaining more testability and flexibility than traditional static methods.

Many examples use Cache::get('key') to demonstrate how a Facade works. Comparing the following code to the utility that a Facade provides.

@DavidKuennen
DavidKuennen / minimal-analytics-snippet.js
Last active January 30, 2026 14:23
Minimal Analytics Snippet
(function (context, trackingId, options) {
const history = context.history;
const doc = document;
const nav = navigator || {};
const storage = localStorage;
const encode = encodeURIComponent;
const pushState = history.pushState;
const typeException = 'exception';
const generateId = () => Math.random().toString(36);
const getId = () => {
@intotecho
intotecho / A MySQL Table to BigQuery Import Script.md
Last active November 27, 2024 02:06 — forked from shantanuo/mysql_to_big_query.sh
Copy MySQL table to big query.

Import a MySQL Table or Database to a BigQuery Schema.

Usage:

~/bin/mysql_table_to_big_query.sh bucket_name schema_name table_name ~/bin/mysql_schema_to_big_query.sh bucket_name [schema_name].

Description

<?php
namespace App\Libraries\Queue;
use Illuminate\Events\Dispatcher;
use Illuminate\Queue\DatabaseQueue;
use Illuminate\Support\Str;
use Laravel\Horizon\Events\JobDeleted;
use Laravel\Horizon\Events\JobPushed;
use Laravel\Horizon\Events\JobReleased;
@robhrt7
robhrt7 / MySQL_5-7_macOS.md
Last active December 23, 2025 00:39 — forked from nrollr/MySQL_macOS_Sierra.md
Install MySQL 5.7 on macOS using Homebrew

This is a fork of original gist https://gist.github.com/nrollr/3f57fc15ded7dddddcc4e82fe137b58e, with slight changes on pointing to 5.7 version branch, instead of 8 (latest default of MySQL in Hombrew).

Install MySQL 5.7 on macOS

This procedure explains how to install MySQL using Homebrew on macOS (Sierra 10.12 and up)

Install Homebrew

  • Installing Homebrew is effortless, open Terminal and enter :
    $ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  • Note: Homebrew will download and install Command Line Tools for Xcode 8.0 as part of the installation process.
@fredeerock
fredeerock / docker_cleanup.md
Last active May 19, 2020 04:05
clean up docker

Stop all containers:

  • docker ps -aq | xargs docker stop

Remove all containers:

  • docker ps -aq | xargs docker rm

Remove all images:

  • docker images -aq | xargs docker rmi

Remove all networks: