Skip to content

Instantly share code, notes, and snippets.

Avatar
:octocat:
Focusing

souhaiebtar

:octocat:
Focusing
View GitHub Profile
@souhaiebtar
souhaiebtar / Hardening_ubuntu_install.sh
Last active Aug 3, 2021
[hardening ubuntu install if default user is root]hardening ubuntu install if default user is root #cloud #linux #hardening
View Hardening_ubuntu_install.sh
#!/bin/sh
# you need to run
# export USER_USERNAME='unknown';
# export USER_PASSWORD='okpoksdsd';
# export USER_HOSTNAME='openvpn';
# export USER_SSHKEY="ssh-ed25519 0000000000000000000000000000000f000f00000000000/Dj4X2tI tunknown@hack-Pro.local";
## or you can copy paste this line
@souhaiebtar
souhaiebtar / steps_to_fix_connection_on_wsl2.md
Last active Jul 8, 2021
[fix connection on wsl2 behind vpn] fix connection on wsl2 behind vpn #wsl2 #vpn #dns
View steps_to_fix_connection_on_wsl2.md

on PowerShell, run

Get-DnsClientServerAddress -AddressFamily ipv4 | Select-Object -ExpandProperty ServerAddresses (on the result returned you have to detect which dns address is used for your vpn, in my case, 3 result are returned, 2 are internal to my local network than it should be the third (for sake of example: 11.9.8.7).

than i used wsl --list --verbose to list wsl2 installation that i had, i had one called Debian (correspond to debian installed from windows store)

@souhaiebtar
souhaiebtar / requirement_for_app.md
Created Jul 7, 2021
[k8s vs cloudfoundry paas requirements and drawback] k8s vs cloudfoundry paas #k8s #paas #iaas #cloud #cloudfoundry
View requirement_for_app.md

It is pivotal to understand the application functionalities and available resources. This is especially the case when a microservice-based design is chosen, and solutions suck as IaaS (Infrastructure as a Service), PaaS (Platform as a Service), SaaS (Software as a Service) are available from a multitude of vendors. Choosing the most suitable deployment tooling will lead to the efficient delivery of the product.

Considering that the application code is available, these are the steps to adopt each proposed solution:

Kubernetes

  • create an OCI (Open Container Initiative) compliant image, usually created by using Docker
  • deploy a Kubernetes cluster with a valid ingress controller for the routing of requests
  • deploy an observability stack, including logs and metrics
  • create the YAML manifests for the application deployment
  • create a CI/CD pipeline to push the Kubernetes resources to the cluster
@souhaiebtar
souhaiebtar / phpstorm_shortcut.md
Created Jun 28, 2021
[phpstorm shorcut] phpstorm shortcut #phpstorm #shortcut
View phpstorm_shortcut.md

php: phpstorm

  • Jump to Navigation Bar* ctrl + / (mac) | ctrl +shift + /

New... ctrl +Enter (mac) | Alt + Enter

Recent Files ctrl + R

File Structure command + R (mac) | alt+ctrl+R Insert live template... command + J | alt+ctrl+J

@souhaiebtar
souhaiebtar / powershell_aliases.ps1
Last active Jun 10, 2021
[powershell aliases] powershell aliases #powershell #aliases
View powershell_aliases.ps1
if (Test-Path Alias:rm) {Remove-Item Alias:rm}
# custom function for 'rm'
function rm {
[CmdletBinding()]
param(
[Parameter(Mandatory = $false)]
[switch]$rf,
[Parameter(Mandatory = $true, ValueFromPipeline = $true)]
[string]$Path
@souhaiebtar
souhaiebtar / .leptonrc
Created Jun 10, 2021
[lepton rc] lepton rc #lepton #config
View .leptonrc
{
"theme": "dark",
"autoupdate": true,
"userPanel": {
"hideProfilePhoto": true
}
}
@souhaiebtar
souhaiebtar / startJob.ps1
Created Jun 10, 2021
[PowerShell start exe file in background] powershell start exe file in background #windows #powershell #background
View startJob.ps1
Start-job -name mysqlServer { C:\Users\starhouni\Documents\APPS\mysql-5.7.32-winx64\bin\mysqld.exe --defaults-file=C:\Users\starhouni\Documents\APPS\mysql-5.7.32-winx64\my.ini --log_syslog=0 }
Start-Job -name phpApp { C:\Users\starhouni\Documents\APPS\xampp\php\php.exe -S 127.0.0.1:8081 -t C:\Users\starhouni\Documents\APPS\xampp\htdocs\copperfield > $null 2>&1 }
# https://stackoverflow.com/questions/185575/powershell-equivalent-of-bash-ampersand-for-forking-running-background-proce
# https://devblogs.microsoft.com/scripting/clean-up-your-powershell-history-to-remove-error-entries/
@souhaiebtar
souhaiebtar / gnomeExtensionsList.md
Created May 31, 2021
[gnome extension] gnome extension list #gnome #extensions
View gnomeExtensionsList.md

gnome extensions list

  • Bluetooth quick connect (active)
  • caffeine (active)
  • cpu power manager (active)
  • dash to panel (active)
  • desktop icons (active)
  • easyscreencast (active)
  • gnome fuzzy search (active)
  • pop shell (active)
  • screenshoot tool (active)
@souhaiebtar
souhaiebtar / linuxSoftList.md
Created May 30, 2021
[linux soft]linux soft #linux #soft
View linuxSoftList.md

onlyoffice-desktopeditors_.deb insync_.deb Postman-.tar.gz atom-.deb jetbrains-toolbox-.tar.gz Lepton-.AppImage microsoft-edge-dev__amd64.deb virtualbox-.deb