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
<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); |
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
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 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'/\,$//' | \ |
das ist ein test zwei
das ist ein test
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
// Your code |
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
<?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/ |
Related tutorial: https://code64.de/visionerdy/wordpress-backups/
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
#!/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 |
NewerOlder