I hereby claim:
- I am bradleyhodges on github.
- I am bradleyhodges (https://keybase.io/bradleyhodges) on keybase.
- I have a public key whose fingerprint is 79D0 52C2 B13B 26CC B71C C4F5 B392 94E6 80D3 EC0F
To claim this, I am signing this object:
| -- Create separate schema for Snowflake logic. See: https://supabase.com/docs/guides/database/extensions?queryGroups=database-method&database-method=dashboard#enable-and-disable-extensions#:~:text=To%20avoid%20namespace%20pollution,%20we%20do%20not%20recommend%20creating%20other%20entities%20in%20the%20extensions%20schema. | |
| CREATE SCHEMA IF NOT EXISTS snowflake_ext; | |
| -- High-performance 12-bit sequence | |
| CREATE SEQUENCE IF NOT EXISTS snowflake_ext.sequence_12bit | |
| AS BIGINT | |
| START 0 | |
| INCREMENT 1 | |
| MINVALUE 0 | |
| MAXVALUE 4095 |
| // SmoothScrollContainer.tsx | |
| 'use client'; | |
| import { ElementType, forwardRef, useEffect, useRef, ReactNode, ComponentPropsWithoutRef } from 'react'; | |
| import Scrollbar from 'smooth-scrollbar'; | |
| // Use this to disable `smooth-scrollbar` for mobile devices | |
| const disableForMobileClients = true; | |
| // Define the props for the SmoothScrollContainer component |
| <?php | |
| // Please note that User Agents can be *EASILY* spoofed. Don't use this as a | |
| // reliable indicator for security purposes. ie. don't trust anything the user | |
| // tells you - that includes user agents and IP addresses. | |
| function detectBrowser($useragent) { | |
| $detectedBrowser = explode(" ", $useragent, 20); | |
| $temp["dtbr_counter"] = true; foreach ($detectedBrowser as &$value) { | |
| if ($temp["dtbr_counter"]) { | |
| $temp["dtbr_exploded"] = explode("/", $value); |
I hereby claim:
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| /* smoothscroll.js by @CheapApples12. Software provided without warranty. ©Copyright @CheapApples12 2017. All rights reserved. | |
| / Do not remove this attribution statement. | |
| / Use html "data-offset" attribute to offset scroll for headers and navbars. Eg. <a href="#test" data-offset="60" /> | |
| */ | |
| $(function() { | |
| $('a[href*="#"]:not([href="#"])').click(function() { | |
| if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) { | |
| var target = $(this.hash); | |
| target = target.length ? target : $('[name=' + this.hash.slice(1) +']'); |
| <?php | |
| class SaferCrypto extends UnsafeCrypto { | |
| const HASH_ALGO = 'sha256'; | |
| public static function encrypt($message, $key, $encode = false) { | |
| list($encKey, $authKey) = self::splitKeys($key); | |
| $ciphertext = parent::encrypt($message, $encKey); | |
| $mac = hash_hmac(self::HASH_ALGO, $ciphertext, $authKey, true); | |
| if ($encode) { |
| function protectEmail($email) { | |
| $suffix = substr($email, strpos($email, "@") + 1); | |
| $email = str_replace($suffix, "", $email); | |
| $email = str_replace("@", "", $email); | |
| if (strlen($email) > 3) { | |
| $f3c = mb_substr($email, 0, 3); | |
| $rlength = (strlen($email) - 3); | |
| $email = $f3c . str_repeat("*", $rlength); | |
| return $email . "@" . $suffix; | |
| } else { |