Skip to content

Instantly share code, notes, and snippets.

View blisabda's full-sized avatar
🏠
Working from home

blisabda

🏠
Working from home
View GitHub Profile
@blisabda
blisabda / centos8-9.sh
Created May 2, 2024 11:34 — forked from yodermk/centos8-9.sh
Commands to live-upgrade CentOS Streams 8 -> 9
# The general procedure here is adapted from the 7->8 guide here. https://www.tecmint.com/upgrade-centos-7-to-centos-8/
#
# It is a curated list of my bash history. I entered other commands so hopefully I got the right ones here.
yum upgrade
reboot
dnf install epel-release
dnf install rpmconf
dnf install yum-utils
rpmconf -a # answer "n" to both things
@blisabda
blisabda / session-handler-life-cycle.md
Created March 15, 2024 02:51 — forked from franksacco/session-handler-life-cycle.md
A complete overview of PHP session handler life cycle

A complete overview of PHP session handler life cycle

The purpose of this document is to provide a complete overview of the PHP session handler life cycle updated to version 7.0 or above. In particular, I want to emphasize what methods and in what order are called when the native PHP functions are used for session management.
I created this document because the information on the web and the official documentation are very superficial on this topic, in particular on what concerns the implementation of a safe and stable session handler.

@blisabda
blisabda / clean_code.md
Created March 14, 2024 04:04 — forked from wojteklu/clean_code.md
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

@blisabda
blisabda / .env
Created March 1, 2024 13:41 — forked from degitgitagitya/.env
Next JS + Next Auth + Keycloak + AutoRefreshToken
# KEYCLOAK BASE URL
KEYCLOAK_BASE_URL=
# KEYCLOAK CLIENT SECRET
KEYCLOAK_CLIENT_SECRET=
# KEYCLOAK CLIENT ID
KEYCLOAK_CLIENT_ID=
# BASE URL FOR NEXT AUTH

Stevey's Google Platforms Rant

I was at Amazon for about six and a half years, and now I've been at Google for that long. One thing that struck me immediately about the two companies -- an impression that has been reinforced almost daily -- is that Amazon does everything wrong, and Google does everything right. Sure, it's a sweeping generalization, but a surprisingly accurate one. It's pretty crazy. There are probably a hundred or even two hundred different ways you can compare the two companies, and Google is superior in all but three of them, if I recall correctly. I actually did a spreadsheet at one point but Legal wouldn't let me show it to anyone, even though recruiting loved it.

I mean, just to give you a very brief taste: Amazon's recruiting process is fundamentally flawed by having teams hire for themselves, so their hiring bar is incredibly inconsistent across teams, despite various efforts they've made to level it out. And their operations are a mess; they don't real

@blisabda
blisabda / entries.json
Created September 27, 2023 09:06 — forked from citrusui/entries.json
Apple TV 4K Aerial screensavers entry list. https://sylvan.apple.com/Aerials/2x/entries.json
{
"version" : 1,
"initialAssetCount" : 4,
"assets" : [
{
"id" : "6154CA95-ED90-446A-9C29-F46EDA2B3741",
"url-1080-SDR" : "https://sylvan.apple.com/Aerials/2x/Videos/DB_D011_C009_2K_SDR_HEVC.mov",
"url-1080-HDR" : "https://sylvan.apple.com/Aerials/2x/Videos/DB_D011_C009_2K_HDR_HEVC.mov",
"url-4K-SDR" : "https://sylvan.apple.com/Aerials/2x/Videos/DB_D011_C009_4K_SDR_HEVC.mov",
"url-4K-HDR" : "https://sylvan.apple.com/Aerials/2x/Videos/DB_D011_C009_4K_HDR_HEVC.mov",
@blisabda
blisabda / ruby-openssl-build.sh
Created September 12, 2023 16:02 — forked from vbatts/ruby-openssl-build.sh
building ruby with a specific openssl
#!/bin/sh
t_dir="$HOME/tmp"
mkdir -p ${t_dir}
pushd ${t_dir}
for url in \
ftp://ftp.ruby-lang.org/pub/ruby/ruby-1.9.3-p194.tar.bz2 \
http://openssl.org/source/openssl-1.0.1c.tar.gz
@blisabda
blisabda / who_is_my_mummy.sh
Created September 9, 2023 20:08 — forked from joechrysler/who_is_my_mummy.sh
Find the nearest parent branch of the current git branch
#!/usr/bin/env zsh
git show-branch -a \
| grep '\*' \
| grep -v `git rev-parse --abbrev-ref HEAD` \
| head -n1 \
| sed 's/.*\[\(.*\)\].*/\1/' \
| sed 's/[\^~].*//'
# How it works:
@blisabda
blisabda / pr.md
Created September 9, 2023 17:26 — forked from piscisaureus/pr.md
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

@blisabda
blisabda / iptables-cheatsheet.md
Created August 18, 2023 04:50 — forked from mcastelino/iptables-cheatsheet.md
iptables-cheatsheet

The netfilter hooks in the kernel and where they hook in the packet flow

The figure below calls out

  • The netfilter hooks
  • The order of table traversal