Skip to content

Instantly share code, notes, and snippets.

View ibrasho's full-sized avatar
📭
Un-contained

Ibrahim AshShohail ibrasho

📭
Un-contained
View GitHub Profile
@ibrasho
ibrasho / check-website-certificate.sh
Created May 1, 2023 06:37
A script to check if a website certificate expires within 10 days
#!/bin/bash
# Replace "example.com" with the domain name of the website you want to check
website="example.com"
# Get the SSL/TLS certificate expiry date
expiry_date=$(openssl s_client -connect ${website}:443 </dev/null 2>/dev/null | openssl x509 -noout -enddate | grep -i "notAfter" | awk -F'=' '{print $2}')
# Convert the expiry date to a Unix timestamp
expiry_timestamp=$(date -d "$(echo ${expiry_date} | awk '{print $1" "$2" "$3" "$4" "$5" "$6}')" +%s)
@ibrasho
ibrasho / geo.json
Last active February 20, 2023 20:50
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ibrasho
ibrasho / bundler-exec.fish
Last active January 6, 2021 19:22 — forked from glv/bundler-exec.fish
Automatically prepend "bundle exec" when appropriate (in fish shell).
# This sets up fish so that, if you type a command that should be
# run using Bundler, it first automatically prepends "bundle exec"
# to the command line buffer before executing it. Works for all
# commands found in the "bin" directory of the current bundle.
#
# To override this behavior and run such a command without Bundler,
# prefix with "command" (e.g., `command rake -T`)
#
# Pros (vs binstubs or aliases):
# * automatically adjusts to bundle changes

K8s from the Inside

Duration: 50 minutes

Level: Intermediate

This session tries to provide a shallow-dive into how several components of Kubernetes work. We go through different controllers and how their control loops affect different objects in K8s, and we explore some lesser-known features and extension points of the Kubernetes platform along the way.

@ibrasho
ibrasho / keybase.md
Created September 10, 2017 21:09
Keybase ID

Keybase proof

I hereby claim:

  • I am ibrasho on github.
  • I am ibrasho (https://keybase.io/ibrasho) on keybase.
  • I have a public key ASBSiBRw-kFVu27mXNP0c_4xcgX_AwohY2ShotMJLg6WOwo

To claim this, I am signing this object:

@ibrasho
ibrasho / cloudSettings
Last active July 3, 2019 20:25
Visual Studio Code Settings Sync Gist
{"lastUpload":"2019-07-03T20:21:49.816Z","extensionVersion":"v3.3.1"}

Keybase proof

I hereby claim:

  • I am ibrasho on github.
  • I am ibrasho (https://keybase.io/ibrasho) on keybase.
  • I have a public key whose fingerprint is 8D89 75B4 3B3A 2C7B 844B 8C0B B6F0 CCF1 5F4B 1470

To claim this, I am signing this object:

<?php
class SomethingSpec extends ObjectBehavior
{
function it_contains_an_instance_of(Class $object)
{
$this->getArray()->shouldContainAnInstanceOf($object);
}
public function getMatchers()
<?php
echo '<pre>';
// Setup input array
$input = [];
for ($i = 0; $i < 100000; $i++) {
$input[] = rand(~PHP_INT_MAX, PHP_INT_MAX);
}
/*
|--------------------------------------------------------------------------
| Delete form macro
|--------------------------------------------------------------------------
|
| This macro creates a form with only a submit button.
| We'll use it to generate forms that will post to a certain url with
| the DELETE method, following REST principles.
|
*/