Skip to content

Instantly share code, notes, and snippets.

View kashmiry's full-sized avatar
🌊
Flowing

Kash kashmiry

🌊
Flowing
View GitHub Profile
@dduvnjak
dduvnjak / add_cloudflare_ips.sh
Last active April 20, 2025 05:41
Add CloudFlare IP addresses to an EC2 Security Group using awscli
# first we download the list of IP ranges from CloudFlare
wget https://www.cloudflare.com/ips-v4
# set the security group ID
SG_ID="sg-00000000000000"
# iterate over the IP ranges in the downloaded file
# and allow access to ports 80 and 443
while read p
do
@chethann
chethann / WebviewResourceMappingHelper.java
Created November 24, 2017 09:19
WebviewResourceMappingHelper Sample Code
package com.test.android.helpers;
import android.os.Build;
import android.webkit.WebResourceResponse;
import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;
import com.test.android.Application;
import org.apache.commons.collections.CollectionUtils;
@andreleoni
andreleoni / automatic_crontab.sh
Last active January 30, 2024 14:27
automatic crontab for automatic mysql/mariadb backup/mysqldump on linux
# Access crontab -e
crontab -e
# Create a CRON like this
30 10 * * * ~/autobackup.sh
# Create autobackup file
touch ~/autobackup.sh
# autobackup.sh content