Skip to content

Instantly share code, notes, and snippets.

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

Hazem Bouzaiene HazemBZ

🏠
Working from home
View GitHub Profile
@HazemBZ
HazemBZ / migrate.md
Last active March 27, 2024 13:20
migrate --> react18

upgrade packages

use npm-check-updates package

Fix react children

for children with props

npx types-react-codemod preset-18 ./src
@HazemBZ
HazemBZ / recorded_solves.md
Created January 3, 2024 16:11
non common issues
Lab Name: Create and Manage Cloud Resources: Challenge Lab (GSP313)
Task 1: Create a project jumphost instance
Run command:
gcloud compute instances create nucleus-jumphost \
--network nucleus-vpc \
--zone us-east1-b \
--machine-type f1-micro \
@HazemBZ
HazemBZ / Dockerfile
Created September 18, 2023 11:36
setting up headful selenium environment on aws fargate
FROM selenium/standalone-chrome as build
USER root
RUN apt-get update && apt-get install python3-distutils xvfb -y
RUN wget https://bootstrap.pypa.io/get-pip.py
RUN python3 get-pip.py
FROM build as install
COPY requirements.txt .
RUN python3 -m pip install -r requirements.txt
@HazemBZ
HazemBZ / llogin-manager-notes.md
Last active September 8, 2023 11:19
login manager and lightdm greeter

commands to determine your login manager / greeter

your session

loginctl list-sessions

session info and service (display manager)

`loginctl show-session <session_number> --all

@HazemBZ
HazemBZ / steps.md
Last active September 8, 2023 09:11
bluetooth suddenly does not work with certain device
  • sudo systemctl restart bluetooth
  • bluetoothctl
  • remove
  • power off
  • default-agent
  • power on
  • scan on
  • trust
  • pair
  • connect
@HazemBZ
HazemBZ / chat.css
Created May 16, 2023 15:37
Chat stacking and scrolling
.messages {
height: 500px;
overflow: auto;
margin-top: 25px;
display: flex;
flex-flow: column nowrap;
> :first-child {
margin-top: auto; // When container is empty takes all empty space
}
}
@HazemBZ
HazemBZ / setup.md
Created April 4, 2023 02:01
Running jekyll with ruby-2.7.2 on arch (or distro having issues with openssl installation)

for short term use:

rvm pkg install openssl

next

rvm install ruby-2.7.2 --with-openssl-dir=$HOME/.rvm/usr
@HazemBZ
HazemBZ / config.yml
Last active January 4, 2023 15:50
Beanstalk deployment files sample
branch-defaults:
default:
environment: image-filter-app-env
group_suffix: null
main:
environment: image-filter-app-env
deploy:
artifact: ./www/Archive.zip
global:
application_name: image-filter-app
@HazemBZ
HazemBZ / ScatterPlot3D.tsx
Created August 9, 2022 09:56
Code snippet for Plotting 3D data (3D scatter plot) using react-typescript and plotly
import { Data } from 'plotly.js'
import Plot from 'react-plotly.js'
interface WidgetProps {
x: number[]
y: number[]
z: number[]
}
function PlotWidget({ fileId = 434 }: { fileId: number }) {