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
| local tsa = require 'tsa' | |
| local kumo = require 'kumo' | |
| kumo.on('tsa_init', function() | |
| tsa.start_http_listener { | |
| listen = '0.0.0.0:8008', | |
| trusted_hosts = { '127.0.0.1', '::1', '0.0.0.0', '0.0.0.0/0' }, | |
| } | |
| end) |
| 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.