Skip to content

Instantly share code, notes, and snippets.

View saviomartin's full-sized avatar
🤙
On a break

Savio Martin saviomartin

🤙
On a break
View GitHub Profile
@saviomartin
saviomartin / saviomartin-2020.stl
Created March 8, 2021 03:37
My 2020 contributions in VR
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@saviomartin
saviomartin / hashnode-blog-custom-css.css
Last active June 9, 2021 07:32
Feel free to use this gist to make your hashnode blog look better ✨️
/* Removed due to some problems */
## For HOME
`
.blog-post-card{
border: 2px solid #e0e0eb;
padding:20px;
border-radius:10px;
height:auto;
margin:20px;
max-width:400px;
@viclafouch
viclafouch / clipboard.js
Last active December 7, 2023 23:10
How to copy an image or a text to clipboard in Javascript (new way !) See https://copy-to-clipboard.now.sh/
// @return Promise<boolean>
async function askWritePermission() {
try {
// The clipboard-write permission is granted automatically to pages
// when they are the active tab. So it's not required, but it's more safe.
const { state } = await navigator.permissions.query({ name: 'clipboard-write' })
return state === 'granted'
} catch (error) {
// Browser compatibility / Security error (ONLY HTTPS) ...
return false