Due to Alan Stern1.
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/python | |
# -*- coding: utf-8 -*- | |
"""Execute a child program in a new process""" | |
import os | |
import subprocess | |
def exec_binary(cmd_line_list, cwd=None, stdout=None, stderr=None, verbose=False): | |
"""Invoke an executable file. |
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 | |
header("Content-Type: text/html; charset=utf-8"); | |
function display_filesize($filesize) { | |
if (is_numeric($filesize)) { | |
$decr = 1024; | |
$step = 0; | |
$prefix = array('Byte','KB','MB','GB','TB','PB'); |
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 | |
# I do not want my screensaver to auto-activate after a timeout. | |
# For some reason, you *have* to select a nonzero, finite timeout value for xscreensaver (there's no "infinity"). | |
# I only want my screensaver to active when I lock my system by pressing [Meta]+[L]. | |
# This hotkey is set up to launch this script, which | |
# - starts the xscreensaver daemon, | |
# - activates the screensaver (with lockscreen enabled), | |
# - waits for it to terminate (unlocking logs an "UNBLANK" event), | |
# - then kills the xscreensaver daemon. |
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
// Beveled wedge shape for OpenSCAD | |
// Written by C.A.P. Linssen <charl@itfromb.it>, Sept 2018 | |
// This software is distributed under the "CC0 1.0 Universal (CC0 1.0)" license. | |
// You should have received a copy of the CC0 Public Domain Dedication along with this software. If not, see <http://creativecommons.org/publicdomain/zero/1.0/>. | |
// module bwedge |
OlderNewer