Skip to content

Instantly share code, notes, and snippets.

View souhaiebtar's full-sized avatar
:octocat:
Focusing

souhaiebtar

:octocat:
Focusing
View GitHub Profile
inside .vimrc
```vimrc
function! UseTabs()
set tabstop=4 " Size of a hard tabstop (ts).
set shiftwidth=4 " Size of an indentation (sw).
set noexpandtab " Always uses tabs instead of space characters (noet).
set autoindent " Copy indent from current line when starting a new line (ai).
endfunction
@souhaiebtar
souhaiebtar / charles key
Created January 13, 2020 14:33
[charles proxy key] an activation key #key #activation
// Charles Proxy License
// Registration code for any version of Charles, who would want to use a cracked version?
// Charles 4.5.5 is currently the latest version and is available.
Registered Name: https://zhile.io
License Key: 48891cf209c6d32bf4
Author: Neo Peng
@souhaiebtar
souhaiebtar / commands.sh
Last active January 16, 2020 07:17
[linux command] a few good linux command to remember #linux #cli
# encrypt all files with the header
```bash
7z a -p"pbVfdPs27Dc" -mhe hello.7z file1.bin file2.doc files.*
```
## https://bytefreaks.net/gnulinux/bash/create-an-encrypted-7zip-archive-with-encrypted-header-as-well-no-filenames-are-visible
@souhaiebtar
souhaiebtar / .xbindkeysrc
Last active November 27, 2021 21:43
[kbindkeys key-map for logitech mx-master] map for xbindkeys #xbindkeys #logitech
# need to install xbindkeys xdotool
# map for the logitech mx master (change volume using the side wheel, and change chrome browser tab using side button
# thumb wheel up => increase volume
# create file ~/.xbindkeysrc with this content, then load settings using 'xbindkeys --poll-rc'
"pactl set-sink-volume @DEFAULT_SINK@ +2%"
b:6
# thumb wheel down => lower volume
"pactl set-sink-volume @DEFAULT_SINK@ -2%"
@souhaiebtar
souhaiebtar / record test script using jmeter
Last active January 27, 2020 10:40
[Load test using jmeter] load test for erp website #jmeter #load-test
# install jmeter 5
`File` -> `Templates...` -> `Recording with Think Time`
than configure your browser(firefox for example) to use `config` from `Http Test script recorder`
generate a report file (-JmyPauseProperty=0 is for running the test without pauses ,start no pauses)
`./jmeter -JmyPauseProperty=0 -n -t ~/Desktop/jmeter/tsouhaieberp.jmx -l ~/Desktop/erpResults.jtl`
generate a dashboard (make sure that the dashboard folder is empty)
@souhaiebtar
souhaiebtar / formatNestedObject.js
Last active January 27, 2020 10:45
[format nest object] help when debugging objects #js #javascript #nested-object
function myStringify(obj, maxDeepLevel = 2) {
if (obj === null) {
return 'null';
}
if (obj === undefined) {
return 'undefined';
}
if (maxDeepLevel < 0 || typeof obj !== 'object') {
return obj.toString();
@souhaiebtar
souhaiebtar / dbeaver.ini
Last active April 19, 2024 13:48
[dbeaver config file] .ini file for dbeaver #dbeaver #linux
# path on linux /usr/share/dbeaver/dbeaver.ini
# path on macos /Applications/DBeaverEE.app/Contents/Eclipse/dbeaver.ini
-vm
/usr/bin/java
-startup
plugins/org.eclipse.equinox.launcher_1.5.600.v20191014-2022.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.1100.v20190907-0426
-vmargs
-XX:+IgnoreUnrecognizedVMOptions
@souhaiebtar
souhaiebtar / change_deb.sh
Created March 19, 2020 08:43
[change dependency for a .deb file] script to change dependency #linux #deb #shell
dpkg-deb -R ./Brackets.Release.1.14.64-bit.deb Brackets
sed -i 's/libcurl3/libcurl3 | libcurl4/' Brackets/DEBIAN/control
dpkg-deb -b Brackets Brackets-fixed.deb
sudo apt install -f ./Brackets-fixed.deb
@souhaiebtar
souhaiebtar / pi_blocklist_porn_top1m.list
Last active March 28, 2020 14:46
[pihole porn blocklist] list of the first 1m porn site visited (data from alexa) to be blocked #pihole #linux
livejasmin.com
bongacams.com
chaturbate.com
pornhub.com
xvideos.com
xhamster.com
xnxx.com
pornhubpremium.com
51.la
youporn.com
@souhaiebtar
souhaiebtar / regex_list.md
Last active May 24, 2020 00:09
[regex_list.md] some regex to use with different software and language #regex #vscode
  • list all string that have estimate_ that is not followed by request
estimate_((?!request))
  • list all string that start log_message, even it's precedded with space character or tab character
^[\t ]*log_message