Skip to content

Instantly share code, notes, and snippets.

View siayi's full-sized avatar
💭
I may be slow to respond.

Ayi Sumarna siayi

💭
I may be slow to respond.
View GitHub Profile
@siayi
siayi / readme.md
Created August 13, 2022 14:11 — forked from mrwweb/readme.md
The Events Calendar v2 Template Reset & Customizations

The Events Calendar v2 Template Reset & Customizations

Version 1.5

Introduction

The Events Calendar is a very powerful WordPress plugin for managing events. However, the way its templates and CSS are implemented—especially in "v2"—leave much to be desired.

This contains all the changes I make on a project for The Events Calendar. Hopefully it's useful. If it saves you an hour, maybe you can buy me a cup of coffee or a beer 🍻

from urllib.parse import urlparse
from tld import get_tld
from datetime import date, datetime
import re, ssl, socket, requests
import pandas as pd
import numpy as ny
import whois
# 1= legitimate, -1= phishing, 0 =suspicious
@siayi
siayi / webhook.py
Created November 3, 2021 12:10 — forked from Bilka2/webhook.py
Simple discord webhook with python
import requests #dependency
url = "<your url>" #webhook url, from here: https://i.imgur.com/f9XnAew.png
#for all params, see https://discordapp.com/developers/docs/resources/webhook#execute-webhook
data = {
"content" : "message content",
"username" : "custom username"
}
@siayi
siayi / gist:6feed486a73e4b20ea1145540d81af62
Created October 29, 2021 16:07 — forked from CristinaSolana/gist:1885435
Keeping a fork up to date

1. Clone your fork:

git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
@siayi
siayi / idm.py
Created October 28, 2021 14:07 — forked from kkprakasa/idm.py
#IDM
#!/bin/python3
import urllib3
from bs4 import BeautifulSoup
from time import sleep
import csv
import sys
import json
import ssl
/**
* Google Maps Tile Carver for Photoshop
*
* @description Tiles a photoshop image to create a Custom Map Type for Google Maps API, tested with CS4 and CS5
* @since 2010-09-01
* @author Will James, http://onNYTurf.com (creator)
* @author Curtis Wyatt, http://gocalipso.com/
* @author Nate Bundy, http://www.lemonrage.com/
* @author Uli Schöberl, http://aplusplus.org
*/
import json
import random
import time
import logging
import requests
from selenium import webdriver
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support import expected_conditions as EC
# https://github.com/SeleniumHQ/selenium/blob/trunk/py/selenium/webdriver/support/relative_locator.py
# https://github.com/SeleniumHQ/selenium/blob/4c5b92bac07b17e223917c31caddf7035c120ea7/py/selenium/webdriver/remote/webdriver.py
from selenium import webdriver
import sys
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.common.by import By
from time import sleep
import urllib3
import warnings
from selenium.webdriver.support.relative_locator import with_tag_name
@siayi
siayi / AbstractBasePage.py
Created October 28, 2021 05:44 — forked from Asad-Khan-Aasanjobs/AbstractBasePage.py
Get element logic for selenium script
"""
__________________________________________________
Base Page that provides basic page functionality
Positional arguments:
Selenium webdriver instance.
__________________________________________________
"""
from bs4 import BeautifulSoup
from random import randint
# Copyright (c) 2021. THIS SOURCE CODE BELONGS TO WB&C/SMARTEEZ INC. ANY OUTSIDER REPLICATION OF IT IS LEGALLY PERSECUTED.
# _______ ________ ________ _______ ________ ________
# |\ ___ \ |\ ___ \|\ ___ \|\ ___ \ |\ ____\|\ __ \
# \ \ __/|\ \ \\ \ \ \ \_|\ \ \ __/|\ \ \___|\ \ \|\ \
# \ \ \_|/_\ \ \\ \ \ \ \ \\ \ \ \_|/_\ \_____ \ \ __ \
# \ \ \_|\ \ \ \\ \ \ \ \_\\ \ \ \_|\ \|____|\ \ \ \ \ \
# \ \_______\ \__\\ \__\ \_______\ \_______\____\_\ \ \__\ \__\
# \|_______|\|__| \|__|\|_______|\|_______|\_________\|__|\|__|
# \|_________|
#