Skip to content

Instantly share code, notes, and snippets.

@abdalmoez
abdalmoez / python-udp-send-packet.py
Last active January 19, 2024 07:25
Send udp packet using python
import socket
UDP_IP = "127.0.0.1"
UDP_PORT = 1234
MESSAGE = "Hello, World!"
print ("UDP target IP:", UDP_IP)
print ("UDP target port:", UDP_PORT)
print ("message:", MESSAGE)
@abdalmoez
abdalmoez / gist:d73189aa382a4664dcd9adaf8df0b430
Last active October 28, 2023 14:09
The JungBall: Privacy Policy
Privacy Policy
BOURAOUI AL MOEZ L.A built the The JungBall app as an Ad Supported app. This SERVICE is provided by BOURAOUI AL MOEZ L.A at no cost and is intended for use as is.
This page is used to inform visitors regarding my policies with the collection, use, and disclosure of Personal Information if anyone decided to use my Service.
If you choose to use my Service, then you agree to the collection and use of information in relation to this policy. The Personal Information that I collect is used for providing and improving the Service. I will not use or share your information with anyone except as described in this Privacy Policy.
The terms used in this Privacy Policy have the same meanings as in our Terms and Conditions, which are accessible at The JungBall unless otherwise defined in this Privacy Policy.
Information Collection and Use
@abdalmoez
abdalmoez / eps2svg.sh
Created July 18, 2023 11:33
Convert EPS file to SVG using inkscape
inkscape --export-plain-svg --export-filename=output.svg input.eps
@abdalmoez
abdalmoez / nanoseconds.converter.py
Created January 7, 2020 11:59
Python convert nano seconds to string (hour, minute, seconds, ...)
def nsToStr(nanoseconds):
h=3.6e+12
m=h/60
s=m/60
return str(int(d/h)) +':'+str(int((d%h)/m))+':'+ str(int((d%h)%m/s)) + '.' + str(int((d%h)%m%s))
@abdalmoez
abdalmoez / text-to-base64url.sh
Created January 10, 2022 13:50
Convert text to base64url
echo -n '{"sub":"RS256inOTA","name":"John Doe"}' | base64 | sed s/\+/-/ | sed -E s/=+$//
@abdalmoez
abdalmoez / linux-monitoring.sh
Created March 16, 2021 12:15
Display memory, network, CPU and disk usage.
#!/bin/bash
echo CPU_USAGE,TOTAL_MEM,USED_MEM,FREE_MEM,DISK_USAGE,RX-OK,RX-ERR,RX-DRP,RX-OVR,TX-OK,TX-ERR,TX-DRP,TX-OVR,Flg
while true
do
TOTAL_MEM=$(free -m | grep Mem | sed 's/ \+/\t/g' | cut -f2)
USED_MEM=$(free -m | grep Mem | sed 's/ \+/\t/g' | cut -f3)
FREE_MEM=$(free -m | grep Mem | sed 's/ \+/\t/g' | cut -f4)
DISK_USAGE=$(df | grep ploop44294p1 | sed 's/ \+/\t/g' | cut -f5)
CPU_USAGE=$(top -bn1 | grep "Cpu(s)" | sed "s/.*, *\([0-9.]*\)%* id.*/\1/" | awk '{print 100 - $1"%"}')
@abdalmoez
abdalmoez / .bashrc
Created July 1, 2020 08:47
cygwin terminal in vsc
[[ ! -z $CWD ]] && cd $CWD
ls -d */ | awk '{print "cd "$0" && git config core.filemode false && cd .."}' > script.sh
chmod +x script.sh
./script.sh
{
...
"problemMatcher": {
"base": "$gcc",
"fileLocation": ["relative", "${workspaceRoot}/builddir"]
}
}
CMD:listbugs(playerid, params[])
{
if(GetFactionType(playerid) != FACTION_FEDERAL)
{
SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you aren't a federal agent.");
return 1;
}
SendClientMessage(playerid, COLOR_GREEN, "Online Bugged players:");