Skip to content

Instantly share code, notes, and snippets.

View MrHDOLEK's full-sized avatar

Aleksander Kowalski MrHDOLEK

View GitHub Profile
@AnandPilania
AnandPilania / LoadTestCommand.php
Last active September 28, 2023 10:39
Laravel Load Testing Command with GuzzleHttp
<?php
namespace App\Console\Commands;
use GuzzleHttp\Client;
use GuzzleHttp\Pool;
use Illuminate\Console\Command;
class LoadTestCommand extends Command
{
@clarkmcc
clarkmcc / delete-shutdown-pods.sh
Last active May 11, 2022 12:15
Deletes Kubernetes pods with a status of Shutdown that are usually left over after a GKE pre-emptible node goes offline.
#!/bin/sh
for namespace in $(kubectl get ns | awk '{print $1}' | grep -v NAME); do
for pod in $(kubectl get pod -n $namespace --field-selector=status.phase!=Running | grep Shutdown | awk '{print $1}' | grep -v NAME); do
kubectl delete pod -n "$namespace" "$pod"
done
done
@jakebathman
jakebathman / remove_laravel_comments.php
Last active October 4, 2024 19:19
Remove comments from fresh Laravel files
<?php
/*
|--------------------------------------------------------------------------
| Remove Laravel Comments
|--------------------------------------------------------------------------
|
| Just made a new Laravel project, but don't want all those big
| comment blocks? Put this in the root of your project and run
| "php remove_laravel_comments.php"
|
@chranderson
chranderson / nvmCommands.js
Last active November 18, 2024 00:17
Useful NVM commands
// check version
node -v || node --version
// list locally installed versions of node
nvm ls
// list remove available versions of node
nvm ls-remote
// install specific version of node