Skip to content

Instantly share code, notes, and snippets.

View tanasecosminromeo's full-sized avatar

Cosmin-Romeo TANASE tanasecosminromeo

  • StudentTenant.com Ltd.
  • Bucharest, Romania / Canterbury, England
View GitHub Profile
@tanasecosminromeo
tanasecosminromeo / GoogleSheetsImport.php
Created May 5, 2020 21:06
This is a Symfony service that allows importing a google sheet into an entity.
<?php
namespace App\Lib;
use Doctrine\ORM\EntityManagerInterface;
use Exception;
use Google_Client;
use Google_Exception;
use Google_Service_Sheets;
object(stdClass)#183 (29) {
["type"]=>
string(4) "text"
["blog_name"]=>
string(11) "nicecreamfm"
["blog"]=>
object(stdClass)#184 (6) {
["name"]=>
string(11) "nicecreamfm"
["title"]=>
@tanasecosminromeo
tanasecosminromeo / test-hdd.sh
Last active October 8, 2022 15:04
HDD Speed Check
#!/bin/bash
if [ $# -eq 0 ]
then
echo "Usage ./test-hdd.sh /mounted-path-of-hdd [size-in-Mb]"
exit;
fi
actualDisk=$(df $1 | grep dev | cut --d ' ' -f1)
#echo Running hdparm -Tt $actualDisk