Skip to content

Instantly share code, notes, and snippets.


Jonas Friedmann frdmn

View GitHub Profile
frdmn / icons.c
Created Mar 22, 2013
Custom MiniDLNA Apple icon - read more:
View icons.c
/* MiniDLNA media server
* This file is part of MiniDLNA.
* Penguin images are the creation of Larry Ewing ( using The GIMP.
* NETGEAR images Copyright (c) 2008- NETGEAR, Inc. All Rights Reserved.
* MiniDLNA is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
frdmn / clients.c
Created Apr 21, 2013
MiniDLNA update interval patch
View clients.c
#include <stdio.h>
#include <string.h>
#include <time.h>
#include "clients.h"
#include "getifaddr.h"
#include "log.h"
struct client_type_s client_types[] =
frdmn / cloudbot
Created Sep 16, 2013
SysVinit start up daemon for CloudBot --- touch /etc/init.d/cloudbot && chmod 700 /etc/init.d/cloudbot && vi /etc/init.d/cloudbot
View cloudbot
# Provides: cloudbot
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: SysVinit start up daemon for CloudBot
# Description: Start up daemon for CloudBot
frdmn / index.php
Created Nov 13, 2013
Subreddit HTML export/lister
View index.php
# Subreddit HTML export
# Log into Reddit and browse to ""
# Save the content with the filename "reddits.json" and place it besides
# this file in the same directory.
$json = file_get_contents("./reddits.json");
$json = json_decode($json, true);
frdmn /
Last active Dec 28, 2015
Bash function for OS X to convert a .mov file into a .gif but in a reasonable quality.

mov2gif converter

Bash function for OS X to convert a .mov file into a .gif but in a reasonable quality.


.mov example (414 KB)

Click here for a example .mov

frdmn /
Created Nov 20, 2013
Install maven3 on OS X 10.9+ via homebrew formula
# In case you run 10.9, there is no maven3 on board by default, and "brew install maven" will fail, so here's a workaround:
brew install
frdmn / bash_aliases
Last active Mar 8, 2020
Nginx and PHP-FPM configuration + default virtual host
View bash_aliases
alias nginx.start='sudo launchctl load /Library/LaunchDaemons/homebrew.mxcl.nginx.plist'
alias nginx.stop='sudo launchctl unload /Library/LaunchDaemons/homebrew.mxcl.nginx.plist'
alias nginx.restart='nginx.stop && nginx.start'
alias php-fpm.start="launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.php56.plist"
alias php-fpm.stop="launchctl unload -w ~/Library/LaunchAgents/homebrew.mxcl.php56.plist"
alias php-fpm.restart='php-fpm.stop && php-fpm.start'
alias mysql.start="launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist"
alias mysql.stop="launchctl unload -w ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist"
alias mysql.restart='mysql.stop && mysql.start'
alias nginx.logs.error='tail -250f /usr/local/etc/nginx/logs/error.log'
frdmn / mininginfo
Last active Jan 1, 2016
Simple bash script to get the latest Informations of your Altcoin Mining workers based on the MPOS API (which is probably used by 95% of the pools out there)
View mininginfo
# MPOS Hostname
# MPOS API token (Login -> Edit Account -> API Key)
json=$(curl -s "http://${config_host}/index.php?page=api&action=getuserstatus&api_key=${config_api}" | python -m json.tool)
parse_hashrate=$(echo "$json" | python -m json.tool | grep "hashrate" | awk '{ print $2 }' | sed 's/,//g')
frdmn / doge.user.js
Created Dec 24, 2013
DogeCoin beautifier. Many Comic Sans. Much esthetic. Wow. — Moved to
View doge.user.js
// ==UserScript==
// @name DogeCoin beautifier
// @version 0.2
// @author frdmn
// @description Such ComicSans. Wow.
// @match *://*/*
// ==/UserScript==
function addGlobalStyle(css) {
var head, style;
frdmn /
Created Dec 27, 2013
Python based `free` equivalent for OS X (Mavericks)
import subprocess
import re
# Get process info
ps = subprocess.Popen(['ps', '-caxm', '-orss,comm'], stdout=subprocess.PIPE).communicate()[0]
vm = subprocess.Popen(['vm_stat'], stdout=subprocess.PIPE).communicate()[0]
# Iterate processes
You can’t perform that action at this time.