Skip to content

Instantly share code, notes, and snippets.

View JohnBra's full-sized avatar
💪
covert memester

Bronathan JohnBra

💪
covert memester
View GitHub Profile
@JohnBra
JohnBra / GlowingGradientBorderButton.tsx
Last active September 15, 2023 16:14
A TailwindCSS glowing gradient border button
import React from 'react'
function cn(...classes: any[]) {
return classes.filter(Boolean).join(' ')
}
type Props = {
gradient: string // 'bg-gradient-to-r from-red-600 via-purple-600 to-blue-600',
children: React.ReactNode
href: string
@pereayats
pereayats / search_users.js
Created September 25, 2022 14:35
Find your potential clients on Twitter using some keywords
const OAuth = require('oauth')
const async = require('async')
const _ = require('lodash')
// YOU CAN FIND THIS ON YOUR TWITTER DEVELOPER CONSOLE
const CLIENT_ID = 'YOUR TWITTER CONSUMER KEY'
const CLIENT_SECRET = 'YOUR TWITTER CONSUMER SECRET'
const ACCESS_TOKEN = 'YOUR ACCESS TOKEN'
const ACCESS_SECRET = 'YOUR ACCESS SECRET'
@JohnBra
JohnBra / useStorage.tsx
Created July 4, 2022 22:44
Typed React useStorage hook for chrome extensions
import { Dispatch, SetStateAction, useState, useEffect, useCallback, useRef } from 'react';
export type StorageArea = 'sync' | 'local';
// custom hook to set chrome local/sync storage
// should also set a listener on this specific key
type SetValue<T> = Dispatch<SetStateAction<T>>;
/**