Skip to content

Instantly share code, notes, and snippets.

View chapter09's full-sized avatar
🚀
Focus

Hao Wang chapter09

🚀
Focus
View GitHub Profile
@chapter09
chapter09 / daemon.md
Created July 8, 2016 21:41 — forked from andreif/daemon.md
A simple unix/linux daemon in Python

A simple unix/linux daemon in Python

Source: http://www.jejik.com/articles/2007/02/a_simple_unix_linux_daemon_in_python/

Access: http://web.archive.org/web/20131025230048/http://www.jejik.com/articles/2007/02/a_simple_unix_linux_daemon_in_python/

by Sander Marechal

I've written a simple Python class for creating daemons on unix/linux systems. It was pieced together for various other examples, mostly corrections to various Python Cookbook articles and a couple of examples posted to the Python mailing lists. It has support for a pidfile to keep track of the process. I hope it's useful to someone.

@chapter09
chapter09 / 0_reuse_code.js
Created July 8, 2016 21:44
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@chapter09
chapter09 / onetab-delete-all.js
Created April 20, 2024 21:32 — forked from uddhabh/onetab-delete-all.js
OneTab delete all saved tabs script
// https://intuitive-theory.com/notes/onetab-delete-all-saved-tabs-script/
function delete_single() {
for (clickable of clickables) {
if (!clickable || clickable.innerHTML !== "Delete all")
continue;
clickable.click();
return true;
}
return false;
}