RUN apt update
RUN apt upgrade -y
RUN apt install -y apt-utils
RUN a2enmod rewrite
RUN apt install -y libmcrypt-dev
RUN apt install -y libicu-dev
RUN docker-php-ext-install -j$(nproc) intl
RUN apt-get install -y libfreetype6-dev libjpeg62-turbo-dev libpng12-dev
RUN docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Here is a quick way to add authentication logging to Laravel. | |
1. Modify app/Providers/EventServiceProvider.php and add lines 16 through 32 of the example file in this GIST. | |
2. Create a new file app/Listeners/LogActivity.php and copy the contents of the file below into that file. | |
3. Enjoy logging. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Created by X00LA | |
# Optimized by Yaroster | |
# Fixed, changed and completed by Roukaysa | |
# License: GPL2.0 https://github.com/X00LA/Bukkit-Essentials-worth.yml/blob/master/LICENSE | |
# Made for MC 1.13+ (Flattened) | |
# Optimized for ideal balanced Economy! | |
# Based on https://github.com/X00LA/Bukkit-Essentials-worth.yml | |
worth: | |
#Iron |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- This service checks all the servers in the named backend (see the | |
-- backend_name var). If _any_ of them are up, it returns 200 OK. If | |
-- they are all down it returns a 500 FAILED. | |
-- | |
-- This is intended to be used as a HTTP health check from an upstream | |
-- load balancer, without this check the most intelligent health check | |
-- that could be performed is a simple TCP check on the HAProxy frontend. | |
-- This would not fail in the event that HAProxy cannot see *any* of its | |
-- downstream servers |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
const SLACK_TOKEN = ''; | |
const SLACK_CHANNEL = '#worldcup'; | |
const SLACK_BOT_NAME = 'World Cup'; | |
const SLACK_BOT_AVATAR = 'https://i.imgur.com/Pd0cpqE.png'; | |
function curl_get($url) { | |
$curl = curl_init(); | |
curl_setopt_array($curl, array( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
find node_modules \( -name '__tests__' -o \ | |
-name 'test' -o \ | |
-name 'tests' -o \ | |
-name 'powered-test' -o \ | |
-name 'docs' -o \ | |
-name 'doc' -o \ | |
-name '.idea' -o \ | |
-name '.vscode' -o \ | |
-name 'website' -o \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#--------------------------------------------------------------------- | |
# Global settings | |
#--------------------------------------------------------------------- | |
global | |
daemon | |
chroot /var/lib/haproxy | |
pidfile /var/run/haproxy.pid | |
maxconn 2048 | |
user haproxy | |
group haproxy |
#Steps to install latest Laravel, LEMP on AWS Ubuntu 16.4 version. This tutorial is the improvised verision of this tutorial on Digitalocean based on my experience.
Run the following commands in sequence.
sudo apt-get install -y language-pack-en-base
sudo LC_ALL=en_US.UTF-8 add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install zip unzip
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Restart Bluetooth Module on Mac OS X | |
# | |
# Requires Blueutil to be installed: http://brewformulas.org/blueutil | |
BT="/usr/local/bin/blueutil" | |
log() { | |
echo "$@" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
GITHUB_TOKEN=$(git config --global github.token) # I've defined an API token in my git config -- ymmv | |
GITHUB_USER="" # the collaborator | |
REPO_OWNER="" # the owner of the repos | |
REPOS="" # space-delimited list of repositories | |
PERMISSION="pull" # may be one of "admin", "push" (i.e., read/write -- default), or "pull" (i.e., read-only) | |
for REPO in ${REPOS} ; do | |
curl -X PUT -i -d '{ "permission": "'${PERMISSION}'" }' \ | |
-H 'Accept: application/vnd.github.ironman-preview+json' \ | |
-H "Authorization: token ${GITHUB_TOKEN}" \ |
NewerOlder