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 useSession from next-auth | |
import useState from react | |
const usePlaidSession = () => { | |
const [linked, setLinked] = useState(false); | |
const [session, loading] = useSession(); | |
const isLinked = linked || session.linked; | |
return {session, isLinked, loading, setLinked} |
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-time-modifier -float 0.4 && \ | |
defaults write com.apple.dock autohide-delay -float 1000 && \ | |
defaults write com.apple.dock autohide-time-modifier -int 0 && \ | |
defaults write com.apple.dock static-only -bool true && \ | |
defaults write com.apple.dock autohide -bool true && \ | |
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
// Setting the watchdog is done with the following. the app uses ReactJS as a framework. | |
// this is just the relevant part of the code. | |
componentDidMount() { | |
this.watchdog = setInterval(this.checkPlayerHealth, 500); | |
} | |
checkPlayerHealth = () => { | |
const delay = this.video.currentTime - this.state.debug.lastCheck; | |
if (!this.video.paused && delay < 0.1 // prob freezing |
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
<!-- | |
# The MIT License (MIT) | |
# | |
# Copyright (c) 2016 Microsoft. All rights reserved. | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
# copies of the Software, and to permit persons to whom the Software is |
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> | |
<head> | |
<title>Basic MediaPlayer</title> | |
<!-- the fopllowing files can be found here https://github.com/Microsoft/TVHelpers/tree/master/tvjs/src --> | |
<link href="../../../src/MediaPlayer/mediaplayer-1.0.0.0.css" rel="stylesheet" /> | |
<script src="../../../src/DirectionalNavigation/directionalnavigation-1.0.0.0.js"></script> | |
<script src="../../../src/MediaPlayer/mediaplayer-1.0.0.0.js"></script> |
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
# syncs editor font size with UI font size | |
# set initial value | |
document.documentElement.style.fontSize = (atom.config.get('editor.fontSize') - 2) + 'px' | |
# update value | |
atom.config.onDidChange 'editor.fontSize', ({newValue}) -> | |
document.documentElement.style.fontSize = (newValue - 2) + 'px' |