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
| #!/usr/bin/env bash | |
| googlechromebookmarks() { | |
| cat ~/.config/google-chrome/Default/Bookmarks | \ | |
| grep -E '\"name|\"url' | \ | |
| grep -vE '\"type\"\:' | \ | |
| awk '{print $1 substr($0,index($0,$2))}' | \ | |
| sed s'/^\"name\"\:/title \= /' | \ | |
| sed s'/^\"url\"\:/url \= /' | \ | |
| sed s'/\,$//' | \ |
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 fs = require("fs"); | |
| const path = require("path"); | |
| function newItem(name, url) { | |
| return { name, url }; | |
| } | |
| const bookmarkPath = path.join( | |
| process.env.HOME, | |
| "/Library/Application Support/Google/Chrome/Default/Bookmarks" |
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
| <html> | |
| <body> | |
| <div id="result"></div> | |
| <script> | |
| if (typeof(EventSource) !== 'undefined') { | |
| console.info('Starting connection...'); | |
| var source = new EventSource('/stream.php'); | |
| source.addEventListener('open', function(e) { | |
| console.info('Connection was opened.'); | |
| }, false); |
OlderNewer