Moved to https://api.fmhy.net
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 ChatScroller(props) { | |
const ref = useRef() | |
const shouldScrollRef = useRef(true) | |
useEffect(()=> { | |
if (shouldScrollRef.current) { | |
const node = ref.current | |
node.scrollTop = node.scrollheight | |
} | |
}) | |
const handleScroll = () => { |
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>Disabled</key> | |
<false/> | |
<key>Label</key> | |
<string>com.nateofnine.FlaggedMailToReminders</string> | |
<key>Program</key> | |
<string>/usr/bin/osascript</string> |
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
// Compile with $ gcc -o lmutracker lmu.m -framework IOKit -framework CoreFoundation -framework Foundation | |
// Usage: ./lmu [now] | |
// Prints out the value from the ambient light sensor and the back light LED every 1/10 of a second. Optionally print just one value. | |
// Inspired by the code found at | |
// http://google-mac-qtz-patches.googlecode.com/svn-history/r5/trunk/AmbientLightSensor | |
// and http://osxbook.com/book/bonus/chapter10/light/ | |
// and http://en.wikipedia.org/wiki/Wikipedia:Reference_desk/Archives/Computing/2010_February_10#Mac_OS_X_keyboard_backlight_drivers | |
// http://forums.macrumors.com/showthread.php?t=1133446 | |
#include <stdio.h> |