Skip to content

Instantly share code, notes, and snippets.

View Artistan's full-sized avatar

Charles Peterson Artistan

View GitHub Profile
@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)
@Artistan
Artistan / A Readme for Adding Certs.md
Last active March 11, 2024 21:12
Add new certificate (cert) from local/internal intranet to your mac

Add a cert to you macbook

USAGE

~/add_cert.sh my.intra.net

you will be asked for your password to add thit to keychain

  • downloads pem file
  • adds to trusted root certificates
@Artistan
Artistan / a ngrok_background.sh
Last active February 23, 2024 22:02 — forked from rjz/ngrok_hostname.sh
Get ngrok hostname from command line
#!/bin/sh
########################################################################################
# I do not need to use the ngrok subdomains...
# start ngrok for my local box (vagrant homestead) in th background
# get the cname from command line for the ngrok alias
# update my subdomain cname to point at new ngrok name
# use it!!!
########################################################################################
# requires ngrok and jq installed.
@Artistan
Artistan / redis_cli_install_update.sh
Last active January 26, 2024 01:08
Install redis-cli on your other machines.
if [[ -d redis ]]
then
cd redis
git pull
else
git clone http://github.com/antirez/redis.git
cd redis && git checkout 4.0
fi
make redis-cli
@Artistan
Artistan / A Link Javascript.md
Last active August 21, 2023 02:35
Add Dark Theme Bookmark
@Artistan
Artistan / free_email_provider_domains.txt
Last active May 22, 2023 13:36 — forked from tbrianjones/free_email_provider_domains.txt
text/csv list of free email domains
rambler.ru
naver.com
hitmail.com
rxdoc.biz
cox.com
126.net
126.com
comast.com
comast.net
yandex.com
@Artistan
Artistan / Appendable.md
Created November 5, 2018 16:21
Make a model dynamically appendable.
@Artistan
Artistan / free-email-domains.php
Last active March 8, 2023 17:30
Php array list of free email domains
return ['free'=>['hitmail.com','rxdoc.biz','cox.com','126.net','126.com','comast.com','comast.net','yandex.com','wegas.ru','twc.com','charter.com','outlook.com','gmx.com','.ddns.org','.findhere.com','.freeservers.com','.zzn.com','1033edge.com','11mail.com','123.com','123box.net','123india.com','123mail.cl','123qwe.co.uk','150ml.com','15meg4free.com','163.com','1coolplace.com','1freeemail.com','1funplace.com','1internetdrive.com','1mail.net','1me.net','1mum.com','1musicrow.com','1netdrive.com','1nsyncfan.com','1under.com','1webave.com','1webhighway.com','212.com','24horas.com','2911.net','2bmail.co.uk','2d2i.com','2die4.com','3000.it','321media.com','37.com','3ammagazine.com','3dmail.com','3email.com','3xl.net','444.net','4email.com','4email.net','4mg.com','4newyork.com','4x4man.com','5iron.com','5star.com','88.am','8848.net','888.nu','97rock.com','aaamail.zzn.com','aamail.net','aaronkwok.net','abbeyroadlondon.co.uk','abcflash.net','abdulnour.com','aberystwyth.com','abolition-now.com','about.com','academycouga

Screen Quick Reference

Basic

Description Command
Start a new session with session name screen -S <session_name>
List running sessions / screens screen -ls
Attach to a running session screen -x
Attach to a running session with name screen -r
@Artistan
Artistan / learning.awk
Last active June 19, 2021 02:25
Learn AWK
#!/usr/bin/awk -f
# Comments are like this
# AWK programs consist of a collection of patterns and actions. The most
# important pattern is called BEGIN. Actions go into brace blocks.
BEGIN {
# BEGIN will run at the beginning of the program. It's where you put all
# the preliminary set-up code, before you process any text files. If you