Skip to content

Instantly share code, notes, and snippets.

@XenitXTD
XenitXTD / homestead_refresh_config.sh
Last active May 23, 2020 07:51
Config to get Homestead VM configured with basics after ssh in. This makes destroying box and updating it less painful as all manual work is in here.
#! /bin/bash
# Install Oh-My-ZSH Shell
if [ ! -d ~/.oh-my-zsh ]
then
curl -Lo install.sh https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh
sh install.sh --unattended
#set as default Shell This will use the echo to auto input password
chsh -s /usr/bin/zsh
@XenitXTD
XenitXTD / LaravelBelongsToManyOverride.php
Last active May 23, 2020 07:41
Laravel Belongs to Many Override
/**
* Define a many-to-many relationship.
*
* @param string $related
* @param string $table
* @param string $foreignPivotKey
* @param string $relatedPivotKey
* @param string $parentKey
* @param string $relatedKey
* @param string $relation
@XenitXTD
XenitXTD / Laravel_Homestead_Oracle after.sh automation of OCI8 Setup
Last active October 11, 2022 19:59
This was an automation configured on the laravel homestead vagrant VM to automate the setup and configuration of the Oracle OCI8 php .so file and installation of the oracle client so that you are able to connect to an oracle database using the Yajra oracle package for laravel, using the homestead after.sh file to setup the required installers et…
#!/bin/sh
# If you would like to do some extra provisioning you may
# add any commands you wish to this file and they will
# be run after the Homestead machine is provisioned.
apt-get update
# if not installed install it
apt-get install unzip
@XenitXTD
XenitXTD / 0_reuse_code.js
Created April 21, 2016 13:51
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console