Skip to content

Instantly share code, notes, and snippets.

View Lalmi-Issam's full-sized avatar

Lalmi Mohammed Issam Lalmi-Issam

  • Annaba, Algeria
View GitHub Profile
@Lalmi-Issam
Lalmi-Issam / cloudflare.sh
Created August 13, 2023 01:30 — forked from Manouchehri/cloudflare.sh
Allow CloudFlare only
# Source:
# https://www.cloudflare.com/ips
# https://support.cloudflare.com/hc/en-us/articles/200169166-How-do-I-whitelist-CloudFlare-s-IP-addresses-in-iptables-
for i in `curl https://www.cloudflare.com/ips-v4`; do iptables -I INPUT -p tcp -m multiport --dports http,https -s $i -j ACCEPT; done
for i in `curl https://www.cloudflare.com/ips-v6`; do ip6tables -I INPUT -p tcp -m multiport --dports http,https -s $i -j ACCEPT; done
# Avoid racking up billing/attacks
# WARNING: If you get attacked and CloudFlare drops you, your site(s) will be unreachable.
iptables -A INPUT -p tcp -m multiport --dports http,https -j DROP
@Lalmi-Issam
Lalmi-Issam / conf
Last active January 24, 2021 20:50
<VirtualHost *:80>
ServerName www.arab-drama.me
ServerAlias arab-drama.me
#DocumentRoot /var/www/project
RewriteEngine on
##HOW TO SETUP DJANGO WEBSITE ?
01/ Install new ubuntu system 18.04 LTS and use follwing cammands to install GUI.
A) "sudo tasksel install ubuntu-mate-desktop"
B) "sudo service lightdm start"
02/ Create new user with "www-data" and superuser permession:
A) "adduser username"
@Lalmi-Issam
Lalmi-Issam / download_progress
Created September 22, 2019 10:37 — forked from andreyshuster/download_progress
ajax download file with progress bar
var target = "file destination";
// check compartibility
// reset progress bar
$('.progress-bar').css('width', '0%').attr('aria-valuenow', 0);
var xhr=new XMLHttpRequest();
xhr.overrideMimeType('application/octet-stream');
xhr.open('GET', target, true);
xhr.responseType='arraybuffer';
xhr.send();
xhr.onprogress=function(e){
@Lalmi-Issam
Lalmi-Issam / sitenavigation-schema-org
Created June 1, 2019 11:42 — forked from HoussenMoshine/sitenavigation-schema-org
Exemple de la balise SiteNavigation de Schema.org
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "SiteNavigationElement",
"name": [
"Comment activer son compte Paypal à Madagascar ?",
"Utilisez Payoneer pour activer son compte Paypal",
"Demander une carte Payoneer",
"Activer la carte Payoneer",
"Activer votre compte Paypal à Madagascar",
@Lalmi-Issam
Lalmi-Issam / main.py
Created May 8, 2019 20:32 — forked from gear11/main.py
Simple Python proxy server based on Flask and Requests. See: http:/python-proxy-server/gear11.com/2013/12/python-proxy-server/
"""
A simple proxy server. Usage:
http://hostname:port/p/(URL to be proxied, minus protocol)
For example:
http://localhost:8080/p/www.google.com
"""