Skip to content

Instantly share code, notes, and snippets.

View supersuryaansh's full-sized avatar
💭
Life is good

supersu supersuryaansh

💭
Life is good
View GitHub Profile
@supersuryaansh
supersuryaansh / full-width-second-button.js
Created July 6, 2024 09:19
Add second button to Divi Full Width Slider.js
<script>
window.onload = function() {
// Code to duplicate the button
const elementToDuplicate = document.querySelector('.et_pb_button.et_pb_more_button');
// Clone the element
const clonedElement = elementToDuplicate.cloneNode(true);
// Update the URL of the cloned element
clonedElement.href = 'https://example.com/#newurl';
@supersuryaansh
supersuryaansh / statusCode.c
Last active December 26, 2023 16:07
Return status code of a webpage in C using CURL
// requires #include <curl/curl.h>
int statusCode(char *addr){
CURL *curl;
CURLcode res;
long response_code;
// Initialize curl
curl_global_init(CURL_GLOBAL_DEFAULT);