Skip to content

Instantly share code, notes, and snippets.

View usingthesystem's full-sized avatar

Markus Müller usingthesystem

View GitHub Profile
@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);
@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"
#!/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 / rename-file-3.md
Last active September 12, 2022 19:21
bla bla blub #tag-two

‎‎​

@usingthesystem
usingthesystem / rename-file-2.md
Last active September 12, 2022 19:21
this is a file #tag-two #usr-bleech-markus

das ist ein test zwei

@usingthesystem
usingthesystem / rename-file.md
Last active September 12, 2022 19:21
this is a test #usr-bleech-markus

das ist ein test

@usingthesystem
usingthesystem / injected.js
Created June 11, 2021 15:48 — forked from uxter/injected.js
How to inject custom JavaScript in web page? (simple google chrome plugin)
// Your code
<?php
/**
* Plugin Name: TOPTAL WP-CLI Commands
* Version: 0.1
* Plugin URI: https://n8finch.com/
* Description: Some rando wp-cli commands to make life easier...
* Author: Nate Finch
* Author URI: https://n8finch.com/
* Text Domain: toptal-wpcli
* Domain Path: /languages/
@usingthesystem
usingthesystem / README.md
Created March 20, 2020 12:11 — forked from hofmannsven/README.md
Storing WordPress files and database with WP-CLI on the server.
@usingthesystem
usingthesystem / git-remove-branches
Created December 11, 2019 03:00 — forked from TBonnin/git-remove-branches
Safely remove local fully merged branches
#!/bin/bash
# This has to be run from master
git checkout master
# Update our list of remotes
git fetch
git remote prune origin
# Remove local fully merged branches