Skip to content

Instantly share code, notes, and snippets.

View Artistan's full-sized avatar

Charles Peterson Artistan

View GitHub Profile
1512048841.635233 [0 192.168.10.11:47628] "SELECT" "0"
1512048841.636909 [0 192.168.10.11:47628] "GET" "laravel:horizon_configs"
1512048841.638580 [0 192.168.10.11:47628] "GET" "laravel:horizon_configs"
1512048841.638968 [0 192.168.10.11:47628] "GET" "laravel:queue_configs"
1512048841.639262 [0 192.168.10.11:47628] "GET" "laravel:queue_configs"
1512048842.187545 [0 192.168.10.10:46302] "SELECT" "0"
1512048842.187973 [0 192.168.10.10:46304] "SELECT" "0"
1512048842.188743 [0 192.168.10.10:46302] "GET" "laravel:horizon_configs"
@Artistan
Artistan / A simple homestead box builder
Last active November 29, 2017 05:21
build a new laravel/homestead - settler - bento - ubuntu - virtualbox.box
build a new vagrant box image.
@Artistan
Artistan / 00000000000
Last active November 29, 2017 02:54
issues with old vagrant box...
Issue reported here...
https://github.com/chef/bento/issues/944
fix is to build your own
https://gist.github.com/Artistan/523b7274ae89cb77b5bd66d8bf0bb8f4
@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 / ..Laravel-Horizon - fix large payloads for dashboard
Last active September 10, 2019 19:06
Fix Large Payloads for Laravel Horizon
If you are getting messages in your console about horizon 404 or 500 due to apache running out of memory it may be due to Horizon defaulting to 50 results per page. This default may cause issues for you, as it did us! We are queueing up large data chunks to bulk insert into elasticsearch as seperate job in order to spread the load and have a large amout of data spread into many jobs that will get injected into a new index or update an old index on elasticsearch. The files below make it possible to continue to use Horizone's web console by truncating the payload for the console display, hence reduction the web report payload by large amounts.
@Artistan
Artistan / create-laravel-project.sh
Created November 16, 2017 19:18
create a new project
#!/bin/bash
composer create-project --prefer-dist laravel/laravel "$1"
cd "$1"
php artisan key:generate
@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 / backup-db.sh
Created October 31, 2017 17:25
Backup 7 days of sql files
#!/bin/bash
mysqldump -u root -pmy1pass --databases wordpress > wordpress-`date +%Y-%m-%d`.sql
find *.sql -mtime +7 -exec rm {} \;
@Artistan
Artistan / How To Use Google Search Engines.md
Last active October 24, 2017 12:55
Short Keyword searching in Google Chrome

Short Keyword Searching :: chrome://settings/searchEngines

  1. Go to Chromebar settings. You can find it by plugging chrome://settings/searchengines into the search bar, or right clicking and selecting “edit search engines.”
  2. Scroll to the very bottom.
  3. There should be three boxes. The first is the name of the site you want to search. That can be anything. The second box, “keyword,” is what you type in before you press Tab.

Wired - How to use Chrome Search

@Artistan
Artistan / EloquentUser.php
Last active May 3, 2024 17:47
Paginator with relations... load the relations on the model
<?php
namespace App;
use Illuminate\Pagination\LengthAwarePaginator;
use App\Http\Controllers\Controller;
class EloquentUser extends Controller {
// these will work for eloquent, but not with a scout->search since scout is not building a query.
public function paginate($query)