Skip to content

Instantly share code, notes, and snippets.

View michabbb's full-sized avatar
💯
Need help ? Call me.....

Micha(el) Bladowski michabbb

💯
Need help ? Call me.....
View GitHub Profile
@michabbb
michabbb / gist:ae30cd8eec81a777afd81237e9b87635
Created December 17, 2024 21:41
Summary of: OpenAI DevDay 2024 | Virtual AMA with Sam Altman, moderated by Harry Stebbings, 20VC
Source: https://youtu.be/Hn27upT2m_o
Conversation Summary:
The conversation with Sam Altman, CEO of OpenAI, covered a wide range of topics, from the future of AI models to the challenges of company growth. Altman emphasized the importance of "reasoning" models for OpenAI's future and their ability to generate new scientific insights and solve complex tasks. He also discussed the development of no-code tools for non-technical founders, the role of open-source models, and the definition of AI agents.
Altman discussed the challenges of OpenAI's rapid growth and the need to create a corporate culture that promotes innovation and new approaches. He also talked about the importance of talent and the need to support people who can reach their full potential.
Another key point was the question of AI commercialization and how AI agents might change SaaS product pricing. Altman emphasized that value creation through AI will be enormous, but it's important to focus on improving the models rather than just solving s
You are tasked with analyzing a merged PDF containing multiple documents in German and creating a bash script to split and rename these documents. Follow these instructions carefully:
First, carefully examine the content of the merged PDF.
Now, follow these steps:
1. Analyze the PDF:
- Identify all distinct documents within the merged PDF.
- Ignore any blank pages (pages that contain no letters).
- Determine the page range for each document.
@michabbb
michabbb / split_pdfs.bash
Created November 2, 2024 20:53
split a large pdf into individual files
#!/bin/bash
# Input PDF file
input_pdf="sample_document.pdf"
# Output files with dates
insurance_policy="car_insurance_2024-11-05.pdf"
bank_statement="bank_statement_2024-11.pdf"
medical_invoice_oct="medical_invoice_2024-10-21.pdf"
medical_invoice_nov="medical_invoice_2024-11-03.pdf"
@michabbb
michabbb / Gemini.php
Created October 22, 2024 17:13
Upload Files to the Gemini API
<?php
namespace App\Services\google;
use Exception;
use Illuminate\Http\Client\ConnectionException;
use Illuminate\Support\Facades\Http;
class Gemini
{
@michabbb
michabbb / intelligentCropTransparent.php
Created October 6, 2024 15:50
intelligent Crop Transparent in PHP
private function intelligentCropTransparent(
string $inputPath,
string $outputPath,
int $padding = 5,
bool $makeSquare = false,
bool $transparentBackground = true
): void
{
$image = new Imagick($inputPath);
@michabbb
michabbb / get_costs_from_asw_by_customer.sh
Created September 1, 2024 12:46
AWS: Get Costs by Customer (based on Tags) for the last month
#!/bin/bash
customer=$1
if [ -z "$customer" ]; then
echo "Error: No customer name provided. Please provide a customer name as the first argument." >&2
exit 1
fi
# Set your AWS credentials here
@michabbb
michabbb / PestPHP architecture testing.php
Last active May 16, 2024 13:07
PestPHP architecture testing
<?php
/** @see https://www.linkedin.com/posts/ashleyjcallen_these-are-some-not-all-of-the-first-pest-activity-7191803157692190720-HAPK **/
test('strict types are used everywhere')
->expect('App')
->toUseStrictTypes();
test('globals')
->expect(['dd', 'ddd', 'die', 'dump', 'ray', 'sleep'])
@michabbb
michabbb / docker-ps-small.sh
Created November 8, 2023 00:13
an example of how to reformat the output of "docker ps" for smaller screens
#!/bin/bash
# Color codes
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
BLUE='\033[0;34m'
NC='\033[0m' # No Color
# Header in green
echo -e "${GREEN}IMAGE\t\t\t\t\t\t\tSTATUS${NC}"
@michabbb
michabbb / example.sh
Created October 12, 2023 16:54
ps ax grep without showing your grep ;)
> ps ax|grep sleep
output:
954190 ? Ss 0:00 sleep infinity
1036329 ? S 0:00 sleep 5
1036386 ? S 0:00 sleep 2
1036397 pts/4 S+ 0:00 grep --color=always sleep <---- you don´t want to see this
3610265 ? S 0:00 sleep 1d
3868324 ? S 0:00 sleep 86400
@michabbb
michabbb / livewire_component_with_a_stick_div_on_top.php
Last active September 26, 2023 19:36
laravel livewire component: sticky div on top only displayed at a specific scrollY position handling dehydration and page reload
<div>
@if($searchResult->count()>1)
<div
x-data="{ scrollTop: parseInt(localStorage.getItem('scrollTop')) || window.scrollY }"
x-init="scrollTop = parseInt(localStorage.getItem('scrollTop')) || window.scrollY"
class="bg-skin-fill text-big-button px-5 py-5 fixed top-0 flex flex-row justify-between mx-auto"
x-on:scroll.window="scrollTop = window.scrollY; localStorage.setItem('scrollTop', String(scrollTop))"
x-bind:class="{'hidden': scrollTop <= 600}" x-cloak
>