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
@Manouchehri
Manouchehri / cloudflare.sh
Last active July 15, 2024 09:25
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
@HoussenMoshine
HoussenMoshine / sitenavigation-schema-org
Created May 6, 2017 08:11
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
"""
##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"
@prof3ssorSt3v3
prof3ssorSt3v3 / app.js
Created March 8, 2021 18:13
Introduction to Service Workers code from video
const APP = {
SW: null,
init() {
//called after DOMContentLoaded
if ('serviceWorker' in navigator) {
// 1. Register a service worker hosted at the root of the
// site using the default scope.
navigator.serviceWorker
.register('/sw.js', {
scope: '/',