Skip to content

Instantly share code, notes, and snippets.

DenBeke /
Created Aug 26, 2019
Appleworks / ClarisWorks to PDF converter script
import os
import subprocess
import sys
def file_to_pdf(root, name):
file_to_pdf converts a single file to PDF
DenBeke / copy.go
Created Aug 24, 2017 — forked from r0l1/copy.go
Copy a directory tree (preserving permissions) in Go.
View copy.go
// CopyFile copies the contents of the file named src to the file named
// by dst. The file will be created if it does not already exist. If the
// destination file exists, all it's contents will be replaced by the contents
// of the source file. The file mode will be copied from the source and
// the copied data is synced/flushed to stable storage.
func CopyFile(src, dst string) (err error) {
in, err := os.Open(src)
if err != nil {
View Fish prompt
function fish_prompt --description 'Write out the prompt'
set -l last_status $status
if not set -q __fish_prompt_normal
set -g __fish_prompt_normal (set_color normal)
set_color $fish_color_cwd
View gist:7f683184e1df767d6002
sudo docker run -it -p 9000:9000 -v /home/:/home/ --net="host" osminogin/php-fpm
DenBeke / external_command.swift
Last active Dec 5, 2015
Executing external command with Swift
View external_command.swift
import Foundation
func executeCommand(command: String, args: [String]) -> String {
let task = NSTask()
task.launchPath = command
task.arguments = args
let pipe = NSPipe()