This file contains hidden or 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
<span class="tw-flex tw-items-center tw-cursor-pointer"> | |
<label for="autoplay" class="tw-text-xs tw-font-medium tw-text-zinc-400 dark:tw-text-zinc-500 tw-mr-2">Autoplay</label> | |
<input type="checkbox" id="autoplay" class="tw-bg-zinc-200 tw-relative tw-inline-flex tw-h-6 tw-w-11 tw-flex-shrink-0 tw-cursor-pointer tw-rounded-full tw-border-2 tw-border-transparent tw-transition-colors tw-duration-200 tw-ease-in-out focus:tw-outline-none focus:tw-ring-2 focus:tw-ring-primary-600 focus:tw-ring-offset-2 before:tw-content-[''] before:tw-translate-x-0 before:tw-pointer-events-none before:tw-inline-block before:tw-h-5 before:tw-w-5 before:tw-transform before:tw-rounded-full before:tw-bg-white before:tw-shadow before:tw-ring-0 before:tw-transition before:tw-duration-200 before:tw-ease-in-out before:tw-relative before:tw-z-10 checked:before:tw-translate-x-5 checked:tw-bg-zinc-200 checked:tw-text-zinc-200 checked:focus:tw-text-primary-600 checked:after:tw-block checked:after:tw-content-[''] checked:after:tw-bg-zin |
This file contains hidden or 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
document.addEventListener("DOMContentLoaded", function() { | |
// Theme Toggle | |
const themeToggle = document.getElementById("dark-mode-toggle"); | |
const themeToggleCircle = document.getElementById("dark-mode-toggle-circle"); | |
// Check if the user has set a theme preference set in localStorage or if the browser preferences | |
if (localStorage.theme === 'dark' || (!('theme' in localStorage) && window.matchMedia('(prefers-color-scheme: dark)').matches)) { | |
document.documentElement.classList.add('dark') | |
} else { |
This file contains hidden or 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() { | |
var styles = document.createElement("style"); | |
styles.innerHTML = "@-moz-keyframes roll{100%{-moz-transform:rotate(360deg)}}@-o-keyframes roll{100%{-o-transform:rotate(360deg)}}@-webkit-keyframes roll{100%{-webkit-transform:rotate(360deg)}}.do-a-barrel-roll{-moz-animation-duration:2s;-moz-animation-name:roll;-moz-animation-iteration-count:1;-webkit-animation-duration:2s;-webkit-animation-name:roll;-webkit-animation-iteration-count:1;-o-animation-duration:2s;-o-animation-name:roll;-o-animation-iteration-count:1}"; | |
document.getElementsByTagName("body")[0].appendChild(styles); | |
var interval; | |
var keyed = ""; | |
document.addEventListener("keypress", function(event) { | |
if (event.charCode === 32) { |
This file contains hidden or 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
alias grum="git checkout master && git pull --all" | |
alias gc="git commit" | |
alias ga="git add" | |
alias gp="git push" | |
alias k="kubectl" |
This file contains hidden or 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
// I had issues with this | |
it('should work', async () => { | |
await waitFor(() => { | |
// assertion | |
}) | |
}); | |
// this worked for me |
This file contains hidden or 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 withPlugins = require('next-compose-plugins'); | |
const withSourceMaps = require('@zeit/next-source-maps'); | |
const nextConfig = { | |
basePath: '/messages', | |
}; | |
const _withSourceMaps = [ | |
withSourceMaps, | |
{ |
This file contains hidden or 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
curl -I <domain> # what headers are enabled on this site | |
sudo lsof -i :<port> # what process (pid) is running at a specified port, followed often by kill -9 <pid> | |
sudo killall -HUP mDNSResponder # reset local DNS cache |
This file contains hidden or 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
#!/bin/bash | |
protected_branches=( production master ) | |
current_branch=$(git symbolic-ref HEAD | sed -e 's,.*/\(.*\),\1,') | |
for i in "${protected_branches[@]}" | |
do | |
protected_branch=$i |
This file contains hidden or 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, {FC} from 'react' | |
import Column from '../Atoms/Column' | |
import Row from '../Atoms/Row' | |
export interface IContentProps { | |
/** | |
* an array of objects with JSX elements | |
* @default <> </> | |
*/ | |
innerContent: JSX.Element |
This file contains hidden or 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
[ | |
{ | |
"_id": "5c4c278665e65c411445a158", | |
"index": 0, | |
"guid": "3d80eb64-3477-408a-997f-eb8fe2e0fb2a", | |
"isActive": true, | |
"about": "Et veniam sunt cillum occaecat dolor in ex sunt nulla anim deserunt cupidatat laborum. Consequat commodo laboris officia labore eiusmod enim pariatur deserunt. Qui minim ipsum incididunt pariatur elit ullamco dolore officia sunt sit cillum.", | |
"highValue": [ | |
"5,763.60", | |
"2,185.52", |