Gary Brooks
banner
garybrooks.bsky.social
Gary Brooks
@garybrooks.bsky.social
F1 fan, Escape Rooms, Gaming, Star Trek Online, Science & Technology. Very casual posts. Learning to code! He/Him
Yesterday was World STEM Day! I posted on Insta for the IMAP mission, and I wanted to share these quotes from women of science, technology, engineering, and math.

It is nice to have a day set aside to celebrate humanity's progress, which wouldn't be possible without women or STEM.
November 9, 2025 at 8:37 PM
Reposted by Gary Brooks
April 26, 2025 at 10:10 PM
SORRY. Sorry.
Have we seen this *incredible* news video coming out of Queensland? Wait for the witness/witnesses statement
April 21, 2025 at 9:46 PM
Reposted by Gary Brooks
Vaccination does NOT cause autism. (Those claims were lies from a liar who wanted to get rich from a competing product.) But even if it did, Penn and Teller show why vaccine opponents (aka pro-virus fools) are simply, utterly, wrong. Vaccinate your kids. youtu.be/RfdZTZQvuCo
Penn and Teller on Vaccinations
YouTube video by UltraMiraculous
youtu.be
March 30, 2025 at 4:42 PM
Reposted by Gary Brooks
Vaccines save a lot of lives. They do NOT cause autism. youtu.be/mLHnUjhzv9E
Vaccines do not cause autism, they save lives
YouTube video by Vox
youtu.be
March 18, 2025 at 8:46 PM
Reposted by Gary Brooks
via r/lego
March 7, 2025 at 6:29 PM
Reposted by Gary Brooks
Vaccines significantly reduce your chances of getting infected, and significantly reduce your chances of dying if you do. They also protect those around you. When enough of us are vaxxed, it can greatly slow the spread of disease, preventing much suffering, and saving many lives.
March 4, 2025 at 4:18 PM
Three fights in first nine seconds of US vs. Canada game at 4 Nations

www.detroitnews.com/story/sports...
February 16, 2025 at 9:39 AM
January 29, 2025 at 10:30 AM
Reposted by Gary Brooks
I love pigeons.
Especially because they walk like this.
January 19, 2025 at 7:45 PM
Reposted by Gary Brooks
This is who Elon Musk really is. Don’t buy a Tesla.

Location: Tesla European HQ, Amsterdam.

www.youtube.com/watch?v=iX3v...
TESLA = TRUMP
YouTube video by Led By Donkeys
www.youtube.com
January 8, 2025 at 2:36 PM
Reposted by Gary Brooks
👀

(this would be the time to use a free code to have friends binge all of Lower Decks k thx)
Now that all eps have dropped, we’re in the “binge period” of a streaming show’s lifecycle. In addition to tracking week to week numbers, a platform takes into account how many folks signup in this period to binge the show. If there’s an uptick in signups and binge viewers, platforms take notice.
December 21, 2024 at 5:26 AM
Despite sincere and conscientious effort, still having difficulty joining in any reindeer games. #HappyHolidays from @startrek.bsky.social @paramountplus.bsky.social @starfleetacademy.bsky.social #thedoctor
December 11, 2024 at 6:50 AM
Reposted by Gary Brooks
🌟 How to setup and use the Google Calendar API
#php #laravel #api #google #calendar #PHP
How to setup and use the Google Calendar API
For a project I'm working on I needed to interact with a Google Calendar. If you've ever worked with some API's by Google then you know their documentation can be very confusing. It's not that they don't have documentation, but code examples of common use cases are simply not present. You must wade through a lot of pages to learn basic things such as how to make an authorized request let alone how to fetch calendar events. In this post I'd like to explain in a human readable way how setup and use the Google Calendar API. <a href="/uploads/2016/05/Screen-Shot-2016-05-09-at-19.44.40.jpg"><img class="alignnone size-full wp-image-2673" src="/uploads/2016/05/Screen-Shot-2016-05-09-at-19.44.40.jpg" alt="Screen Shot 2016-05-09 at 19.44.40" width="970" height="568" /></a> <h3>Getting credentials</h3> The first thing you'll need to do is to get some credentials to use Google API's. I'm assuming that you've already created a Google account and are signed in. Head over to<a href="https://console.developers.google.com/apis/library"> Google API's site</a> and click "Select a project" in the header. Choose "Create a new project" in the menu that opens. You can give that project any name you'd like. <a href="/uploads/2016/05/Screen-Shot-2016-05-09-at-18.55.44-1.jpg"><img class="alignnone size-full wp-image-2668" src="/uploads/2016/05/Screen-Shot-2016-05-09-at-18.55.44-1.jpg" alt="Screen Shot 2016-05-09 at 18.55.44" width="2784" height="1816" /></a> Next up we must specify which API's the project may consume. In the list of available API's click "Google Calendar API". On the next screen click "Enable". <a href="/uploads/2016/05/Screen-Shot-2016-05-09-at-18.56.07-1.jpg"><img class="alignnone size-full wp-image-2669" src="/uploads/2016/05/Screen-Shot-2016-05-09-at-18.56.07-1.jpg" alt="Screen Shot 2016-05-09 at 18.56.07" width="2784" height="1816" /></a> Now that you've created a project that has access to the Calendar API it's time to download a file with these credentials. Click "Credentials" in the sidebar. You'll want to create a "Service account key".<a href="/uploads/2016/05/Screen-Shot-2016-05-09-at-18.56.48.jpg"><img class="alignnone size-full wp-image-2661" src="/uploads/2016/05/Screen-Shot-2016-05-09-at-18.56.48.jpg" alt="Screen Shot 2016-05-09 at 18.56.48" width="2784" height="1816" /></a> On the next screen you can give the service account a name. You can name it anything you'd like. In the service account id you'll see an email address. We'll use this email address later on in this guide. Select "JSON" as the key type and click "Create" to download the JSON file. <a href="/uploads/2016/05/Screen-Shot-2016-05-09-at-18.57.18.jpg"><img class="alignnone size-full wp-image-2662" src="/uploads/2016/05/Screen-Shot-2016-05-09-at-18.57.18.jpg" alt="Screen Shot 2016-05-09 at 18.57.18" width="2784" height="1816" /></a> <h3>Setting up the Google Calendar</h3> Now that everything is set up on the API site, we'll need to configure some things on the Google Calendar site. Head over Google Calendar and view the settings of the calendar you want to work with via PHP. On the "Share this Calendar" tab add the service account id that was displayed when creating credentials on the API site. <a href="/uploads/2016/05/Screen-Shot-2016-05-09-at-19.10.52.jpg"><img class="alignnone size-full wp-image-2664" src="/uploads/2016/05/Screen-Shot-2016-05-09-at-19.10.52.jpg" alt="Screen Shot 2016-05-09 at 19.10.52" width="2780" height="1812" /></a> Open up the "Calendar Details" tab to see the id of the calendar. We'll need this id later on. <a href="/uploads/2016/05/Screen-Shot-2016-05-09-at-19.19.10.jpg"><img class="alignnone size-full wp-image-2665" src="/uploads/2016/05/Screen-Shot-2016-05-09-at-19.19.10.jpg" alt="Screen Shot 2016-05-09 at 19.19.10" width="2784" height="1816" /></a> <h3>Accessing the calendar in PHP</h3> Now that everything is set up at Google, let's finally write some PHP. In your project make sure you require `google/apiclient` in your `composer.json`. This piece of code can be used to fetch all events on your calendar: ```php $client = new Google_Client(); // $credentialsJson should contain the path to the json file downloaded from the API site $credentials = $client->loadServiceAccountJson( $credentialJson, 'https://www.googleapis.com/auth/calendar' ); $client->setAssertionCredentials($credentials); $service = new Google_Service_Calendar($client); // $calendarId should contain the calendar id found on the settings page of the calendar $events = $service->events->listEvents($calendarId); ``` In the example above all events will get fetched. Of course the API can do a whole lot more. Take a look at <a href="https://developers.google.com/google-apps/calendar/v3/reference/events">the API docs</a> to learn what's possible. <h3>In closing</h3> Setting up and using the calendar API, and the other Google API's is not that difficult. The key thing that's missing is proper documentation. I hope that in the future Google will add some easy to follow tutorials and practical examples to their docs. It took me about an hour to learn and set everything mentioned in this post. With good documentation the required time would be around 5 minutes (and there would be much less frustration). If you're using Laravel you'll be happy to know that I'm currently developing <a href="https://github.com/spatie/laravel-google-calendar">a package</a> that makes working with a Google Calendar a breeze. My goal is to make this code work: ```php use \Spatie\GoogleCalendar\Event; //creating events $event = new Event(); $event->title = 'My new event' $event->start = Carbon::now(); $event->end = Carbon::now()->addHour(); $event->save(); //fetching all events $allEvents = Event::all(); //updating an event $event = $allEvents->first(); $event->name = 'updated name'; $event->save(); //deleting an event $allEvents->last()->delete(); ``` I'm not planning on supporting all the features of the native API, but if you need only the basic functionality, this will be the package for you.
freek.dev
December 9, 2024 at 8:41 AM
December 6, 2024 at 9:38 PM
Reposted by Gary Brooks
Word of the Day: APANTHROPY - a love of solitude, an aversion to spending time with other people.
December 1, 2024 at 4:37 PM
Reposted by Gary Brooks
Another thread of Star Trek fonts!

No structure this time, I'm just going to share whatever I can identify in whichever order takes my fancy. These fonts will mostly be official, or notable, or otherwise have caught my eye. 🧵 [1/∞]
November 25, 2024 at 4:02 PM
Reposted by Gary Brooks
November 19, 2024 at 12:31 AM
I would like to speak up today for the trans community.

You see, I know a bit of what it’s like to be politically scapegoated. When Japan attacked Pearl Harbor in 1941, suddenly anyone in America who had any amount of Japanese ancestry became suspect. Politicians preyed upon ignorance and fear. /1
November 18, 2024 at 8:21 PM
Reposted by Gary Brooks
Got it up now! Take a peak!
youtu.be/UUWN-cRNuXo
Shield Capacity Build Ft: Dauntless II Command Science Dreadnought
YouTube video by GalacticGaming
youtu.be
November 12, 2024 at 3:41 AM