Skip to content

Instantly share code, notes, and snippets.

View dskanth's full-sized avatar

Shasi kanth dskanth

View GitHub Profile
@dskanth
dskanth / Switch.vue
Created August 17, 2023 11:54 — forked from thomaslombart/Switch.vue
An example of a toggle switch with Vue 3
<template>
<label class="container">
<input
v-bind="$attrs"
class="input"
type="checkbox"
:checked="checked"
@change="$emit('update:checked', $event.target.checked)"
/>
<span class="switch"></span>
@dskanth
dskanth / verify-google-recaptcha-with-php
Last active July 26, 2017 11:50 — forked from jonathanstark/verify-google-recaptcha-with-php
Verify Google reCAPTCHA with PHP
#
# Verify captcha
$post_data = http_build_query(
array(
'secret' => CAPTCHA_SECRET,
'response' => $_POST['g-recaptcha-response'],
'remoteip' => $_SERVER['REMOTE_ADDR']
)
);
$opts = array('http' =>