This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<script src="index.js"></script> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>fingerprinting</title> | |
</head> | |
<body> | |
<div id="print-id-here">check the console, something went wrong :/</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defaults write com.apple.dock autohide-delay -float 0; killall Dock | |
defaults write com.apple.dock autohide-time-modifier -float 0.12;killall Dock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* eslint-disable @typescript-eslint/no-explicit-any */ | |
import { useRef, useCallback, useEffect } from 'react'; | |
export default function useDebouncedCallback<T extends (...args: any[]) => any>( | |
callback: T, | |
delay: number, | |
options: { maxWait?: number; leading?: boolean; trailing?: boolean } = {}, | |
): [T, () => void, () => void] { | |
const maxWait = options.maxWait; | |
const maxWaitHandler = useRef<NodeJS.Timeout | null>(null); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function initObservable() { | |
let observableData = []; | |
let observers = []; | |
const updateData = newData => { | |
observableData = newData; | |
updateObservers() | |
}; | |
const subscribe = obs => observers.push(obs); | |
const unsubscribe = f => (observers = observers.filter(obs => obs !== f)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
find ./ -name "node_modules" -type d -prune -exec rm -rf '{}' + |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { createContext, useState, useContext } from 'react'; | |
import PropTypes from 'prop-types'; | |
import { Notification } from '../components'; | |
const NotificationContext = createContext({}); | |
const NotificationProvider = ({ children }) => { | |
const [notifications, updateNotifications] = useState([]); | |
/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { useEffect, useRef } from 'react' | |
function useTimeout(callback, delay) { | |
const savedCallback = useRef() | |
// Remember the latest callback. | |
useEffect( | |
() => { | |
savedCallback.current = callback | |
}, | |
[callback] | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Ansi 0 Color</key> | |
<dict> | |
<key>Alpha Component</key> | |
<real>1</real> | |
<key>Blue Component</key> | |
<real>0.16862741112709045</real> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const fetch = require("node-fetch"); | |
const WEBHOOK_URL = "WEBHOOK_FROM_NETLIFY"; | |
const authUsers = ["USER_ID_FROM_SLACK"]; | |
module.exports = async (req, res) => { | |
const { body } = req; | |
if (authUsers.includes(body.user_id)) { | |
// send the webhook |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const Checkbox = styled.div` | |
width: 36px; | |
height: 36px; | |
border-radius: 6px; | |
transition: all 150ms; | |
border: ${colors.darkgrayFaded} solid 1px; | |
display: flex; | |
align-items: center; | |
cursor: pointer; | |
justify-content: center; |
NewerOlder