Expand the disk in esx
Take a snapshot
sudo su
make it look for the bigger disks
echo "1" > /sys/class/scsi_disk/{your device here}/device/rescan
def gcd(a,b): | |
while (b>0): | |
r=a%b | |
a,b=b,r | |
return a |
Expand the disk in esx
Take a snapshot
sudo su
make it look for the bigger disks
echo "1" > /sys/class/scsi_disk/{your device here}/device/rescan
done on ubuntu 20.04
wget -qO- https://repos.influxdata.com/influxdb.key | gpg --dearmor > /etc/apt/trusted.gpg.d/influxdb.gpg
export DISTRIB_ID=$(lsb_release -si); export DISTRIB_CODENAME=$(lsb_release -sc)
Expand the disk in esx
Take a snapshot
Refresh disk size
echo 1>/sys/class/block/sda/device/rescan
if you fdisk /dev/sda
you should get an error like GPT PMBR size mismatch (2147483647 != 4294967295) will be corrected by w(rite).
pip3 install in_place
input cast goes in input.cast, this file is overwritten update the factor variable to increase the timelapse speed.
python3 script.py
// credit to wheredidgogogo | |
// https://laracasts.com/discuss/channels/eloquent/hasmanythrough-with-two-pivot-tables | |
public function hasPermission($permission_name) | |
{ | |
$result = \DB::table('users') | |
->join('role_user','users.id','=','role_user.user_id') | |
->join('roles','role_user.role_id','=','roles.id') | |
->join('permission_role','roles.id','=','permission_role.role_id') | |
->join('permissions','permission_role.permission_id','=','permissions.id') | |
->select('permissions.*')->where('users.id','=',\Auth::user()->id)->where('permissions.name','=',$permission_name)->count(); |
<?php | |
$q = (isset($_REQUEST['q'])) ? $_REQUEST['q'] : ''; | |
$records = dns_get_record("{$q}.domainname.tld", DNS_TXT); | |
$return = []; | |
if($records===false)exit( "Nope. ") ; | |
foreach($records as $record){ | |
$arr = explode(':', $record['txt'], 2); | |
if(preg_match("/:/", $record['txt'])==true && is_numeric($arr[0])){ | |
$return[$arr[0]] = $arr[1]; | |
} else { |
I really don't recommend using this in production environments. There are potential issues with this script that could cause some damage.
Just some notes I'm keeping for myself about my install that got things working - in case | |
I screw things up at some later point. | |
Get a drive with ubuntu installer image on it. | |
Run the check the drive utility to make sure things are all good before installing (You dealt | |
with a bad drive before, everythin looked good, but things didn't work perfect) | |
Install ubuntu via the second option, "install ubuntu" not through the try it first. | |
It crashed at the reboot part of the process |