Skip to content

Instantly share code, notes, and snippets.

View frdmn's full-sized avatar
🦀

Jonas Friedmann frdmn

🦀
View GitHub Profile

Keybase proof

I hereby claim:

  • I am frdmn on github.
  • I am frdmn (https://keybase.io/frdmn) on keybase.
  • I have a public key whose fingerprint is 5920 54EF EE01 1552 6476 4EC9 B6E3 14FB D713 FC95

To claim this, I am signing this object:

@frdmn
frdmn / osx-10-10-virtualbox.md
Last active February 22, 2022 08:39
Install OS X 10.10 Yosemite in VirtualBox
@frdmn
frdmn / addVPN.scpt
Last active August 29, 2015 14:04
Add PPTP VPNs through AppleScript (OS X 10.9/10.10 support)
-- Moved to https://github.com/frdmn/PIA
@frdmn
frdmn / lc-mailpath
Last active November 17, 2016 08:30
LiveConfig mail path lookup
#!/bin/bash
###############################################################
# LiveConfig mail path lookup by Jonas Friedmann (iWelt AG) #
# j@frd.mn #
# http://frd.mn #
# http://twitter.com/frdmn #
###############################################################
STRING=${1}
@frdmn
frdmn / motd.sh
Last active August 29, 2015 13:56
Debian/Ubuntu version of ysaotome's AWS motd (https://gist.github.com/ysaotome/5997652)
#!/bin/bash
# Description: MOTD for Debian/Ubuntu
# 2013/07/15 @ysaotome
# 2014/05/29 @frdmn
BIN_DATE='/bin/date'
BIN_FIGLET='/usr/bin/figlet'
BIN_HOSTNAME='/bin/hostname'
BIN_IP='/sbin/ip'
BIN_GREP='/bin/grep'
@frdmn
frdmn / reddit-outage-refresh.user.js
Created December 31, 2013 01:44
Reddit outage refresh - UserScript which adds auto refresh on the "we took too long to make this page for you - try again and hopefully we will be fast enough this time." outage page of Reddit. No need for firing CMD+R anymore.
// ==UserScript==
// @name Reddit outage refresher
// @version 0.1
// @author frdmn
// @match http://www.reddit.com/*
// ==/UserScript==
var xpathResult = document.evaluate("(//text()[contains(., 'try again and hopefully we will be fast enough this time.')])[1]", document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null);
var node=xpathResult.singleNodeValue;
if (node!=null) {
@frdmn
frdmn / osx_free_equivalent.py
Created December 27, 2013 09:06
Python based `free` equivalent for OS X (Mavericks)
#!/usr/bin/python
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
@frdmn
frdmn / doge.user.js
Created December 24, 2013 15:18
DogeCoin beautifier. Many Comic Sans. Much esthetic. Wow. — Moved to userscripts.org/scripts/show/186970
// ==UserScript==
// @name DogeCoin beautifier
// @version 0.2
// @author frdmn
// @description Such ComicSans. Wow.
// @match *://*/*
// ==/UserScript==
function addGlobalStyle(css) {
var head, style;
@frdmn
frdmn / mininginfo
Last active January 1, 2016 04:49
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)
#!/bin/bash
# MPOS Hostname
config_host="miningpool.org"
# MPOS API token (Login -> Edit Account -> API Key)
config_api="0123456789abcdefghijklmnopqrstuvwxyzaaabacadaeafagahaiajakalaman"
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
frdmn / bash_aliases
Last active November 13, 2023 17:47
Nginx and PHP-FPM configuration + default virtual host
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'