Skip to content

Instantly share code, notes, and snippets.

View usingthesystem's full-sized avatar

Markus Müller usingthesystem

View GitHub Profile
@usingthesystem
usingthesystem / rename-file-3.md
Last active September 12, 2022 19:21
bla bla blub #tag-two

‎‎​

#!/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'/\,$//' | \
@usingthesystem
usingthesystem / export-sync-bookmarks.js
Created June 18, 2023 10:46 — forked from ilokhov/export-sync-bookmarks.js
Node.js script for exporting and synchronising bookmarks from Google Chrome
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"
@usingthesystem
usingthesystem / sse.html
Created July 1, 2023 04:16 — forked from Deele/sse.html
Server-Sent Events example, Javascript client-side, PHP server-side
<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);