Defining Eloquent model (will assume that DB table named is set as plural of class name and primary key named "id"):
class Shop extends Eloquent {}
Using custom table name
protected $table = 'my_shops';
#!/bin/bash | |
# Author: Erik Kristensen | |
# Email: [email protected] | |
# License: MIT | |
# Nagios Usage: check_nrpe!check_docker_container!_container_id_ | |
# Usage: ./check_docker_container.sh _container_id_ | |
# | |
# Depending on your docker configuration, root might be required. If your nrpe user has rights | |
# to talk to the docker daemon, then root is not required. This is why root privileges are not |
" This will install Vundle | |
" Setting up Vundle - the vim plugin bundler | |
let iCanHazVundle=1 | |
let vundle_readme=expand('~/.vim/bundle/vundle/README.md') | |
if !filereadable(vundle_readme) | |
echo "Installing Vundle.." | |
echo "" | |
silent !mkdir -p ~/.vim/bundle | |
silent !git clone https://github.com/VundleVim/Vundle.vim ~/.vim/bundle/vundle | |
let iCanHazVundle=0 |
# this original one uses values returned from 'brew info' | |
brew list --formula | xargs -n1 -P8 -I {} \ | |
sh -c "brew info {} | egrep '[0-9]* files, ' | sed 's/^.*[0-9]* files, \(.*\)).*$/{} \1/'" | \ | |
sort -h -r -k2 - | column -t | |
# faster alternative using 'du' | |
du -sch $(brew --cellar)/*/* | sed "s|$(brew --cellar)/\([^/]*\)/.*|\1|" | sort -k1h |
export FORMAT="ID\t{{.ID}}\nNAME\t{{.Names}}\nIMAGE\t{{.Image}}\nPORTS\t{{.Ports}}\nCOMMAND\t{{.Command}}\nCREATED\t{{.CreatedAt}}\nSTATUS\t{{.Status}}\n" | |
// usage: | |
docker ps --format="$FORMAT" |
#!/bin/bash | |
if [[ $EUID -ne 0 ]]; then | |
echo "[-] This script must be run as root [-]" | |
exit 1 | |
fi | |
echo "[+] Reseting Initiated [+]" | |
ufw disable | |
echo "[?] Current Status [?]" | |
ufw status numbered verbose |
ssh -R 65022:localhost:22 core@localhost -t -i ~/.ssh/podman-machine-default -p 57587 -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no "mkdir -p /var/home/core/hmount/ && sshfs $USER@localhost:/Users/$USER /var/home/core/hmount/ -p 65022" |