Skip to content

Instantly share code, notes, and snippets.

View Artistan's full-sized avatar

Charles Peterson Artistan

View GitHub Profile
@Artistan
Artistan / Envoy.blade.php
Created August 15, 2017 14:51 — forked from halilim/Envoy.blade.php
Sample Envoy tasks for a Laravel project. - http://laravel.com/docs/ssh - https://github.com/laravel/envoy
* -A in SSH enables agent forwarding.
* -p 2122 is not needed if you use the default port of 22.
* Replace SSH_USER and example.com with your own values.
* Example run: $ envoy run deploy_demo
* --no-scripts because Laravel composer.json's post-install-cmd includes optimize, which is already done by php artisan dump-autoload
@servers(['test' => '-A -p 2122 -l user test.example.com', 'prod' => '-A -p 2122 -l user example.com'])
@task('install_test', ['on' => ['test']])
cd project
@Artistan
Artistan / slack-invite-all-members-to-a-channel.js
Created November 7, 2017 13:19 — forked from ZackStone/slack-invite-all-members-to-a-channel.js
Invite all team members to a Slack channel
/*
https://webapps.stackexchange.com/questions/100820/how-do-i-invite-all-team-members-to-a-new-slack-channel#answer-104062
Instructions: Just browse to the appropriate channel and paste
this script (below) into your Chrome/Firefox dev console and hit enter.
Then wait for the script to run until it completes.
It might take time as there is a limit to how many users may be invited at once.
The script will loop until all team members are invited.
*/
var foundAny=false;
function selectAllByLetter(remainingLetters) {
@Artistan
Artistan / init.sh
Created November 28, 2017 15:37 — forked from LeiHao0/init.sh
UpdateBrewDaily
ln -s $Path/AutoUpdateBrew/launchd.plist ~/Library/LaunchAgents/sh.brew.update
launchctl load ~/Library/LaunchAgents/sh.brew.update
@Artistan
Artistan / Ruby Environment.md
Last active January 25, 2018 15:04 — forked from andrewroycarter/Cocoapods Environment.md
Directions on installing chruby, ruby, ruby-build, and bundler.

Setting up a good Ruby environment

Before you start

Make sure that you have the latest version of Xcode installed from the Mac App Store, and that you have the command line tools installed. To install the command line tools, open Xcode, click Xcode->Preferences->Downloads->Command Line Tools

Install brew if needed.

ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"

@Artistan
Artistan / .gitignore
Created February 12, 2018 13:12 — forked from salcode/.gitignore
Please see https://salferrarello.com/wordpress-gitignore/ for the canonical version of this WordPress .gitignore file. Note: I do not receive notifications for comments here (because GitHub does not send notifications on Gists)
# -----------------------------------------------------------------
# .gitignore for WordPress @salcode
# ver 20160309
#
# From the root of your project run
# curl -O https://gist.githubusercontent.com/salcode/b515f520d3f8207ecd04/raw/.gitignore
# to download this file
#
# By default all files are ignored. You'll need to whitelist
# any mu-plugins, plugins, or themes you want to include in the repo.
@Artistan
Artistan / gstreamer-build.sh
Last active August 12, 2018 01:05 — forked from sphaero/gstreamer-build.sh
Install & build gstreamer from git
#!/bin/bash --debugger
export MAKEFLAGS="-j2"
set -e
#########################################
#
# ./script.sh [optional version]
#
# NOTES:
# make --> https://github.com/Tes3awy/OpenCV-3.2.0-Compiling-on-Raspberry-Pi#step-12
@Artistan
Artistan / gw-calc-subtotal.php
Created October 19, 2018 15:45 — forked from spivurno/gw-calc-subtotal.php
Gravity Wiz // Gravity Forms // Calculation Subtotal Merge Tag
<?php
/**
* --- STOP! ---
* Get the latest version:
* https://gravitywiz.com/documentation/gravity-forms-ecommerce-fields/
* -------------
*
* Calculation Subtotal Merge Tag
*
* Adds a {subtotal} merge tag which calculates the subtotal of the form. This merge tag can only be used
@Artistan
Artistan / laravel-mix-font-awesome.md
Last active April 10, 2019 12:19 — forked from karlhillx/laravel-mix-font-awesome.md
Want to use Laravel and Font Awesome? (Regularly updated)

Laravel Mix & Font Awesome Setup: Compiling Assets

This document provides help on getting your Laravel instance running with the latest versions of Laravel Mix and Font Awesome.

Mix

Steps

Build your webpack.mix.js configuration.

@Artistan
Artistan / install-php7.2-mcrypt.sh
Created June 29, 2018 19:21 — forked from arzzen/install-php7.2-mcrypt.sh
Install PHP 7.2 MCrypt extension
## How to install mcrypt in php7.2
##
## https://lukasmestan.com/install-mcrypt-extension-in-php7-2/
##
#
# Check version php and pecl
#
php -v # if default php is not 7.2 then use /usr/bin/php7.2 instead php
@Artistan
Artistan / 1README.md
Created August 22, 2020 19:11 — forked from joseluisq/1README.md
Configure PHP Lumen 5 HTTP Exception Handlers with common JSON responses.

Lumen 5 HTTP Exception Handlers with JSON support.

Configure PHP Lumen 5 HTTP Exception Handlers with common JSON responses.

image

Setup

Copy (replace) only the attached files to their respective directories. app/Exceptions/Handler.php and app/Http/Middleware/Authenticate.php