git clone https://git.samba.org/samba.git
brew install cmake gnutls jansson libarchive openssl pkg-config [email protected]
brew install readline && brew link --force readline
export CPPFLAGS="-I/usr/local/opt/libarchive/include -I/usr/local/opt/readline/include -I/usr/local/opt/openssl@3/include"
export LDFLAGS="-L/usr/local/opt/libarchive/lib -L/usr/local/opt/readline/lib -L/usr/local/opt/openssl@3/lib"
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
--------------------------------------------------------------------- | |
-- Converter between win-125x and UTF-8 strings | |
--------------------------------------------------------------------- | |
-- Written in pure Lua, compatible with Lua 5.1-5.4 | |
-- Usage example: | |
-- require("win-125x") | |
-- str_win = utf8_to_win(str_utf8) | |
-- str_utf8 = win_to_utf8(str_win) | |
--------------------------------------------------------------------- |
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 | |
function calc_percentage () { | |
mem="$1" | |
total="$2" | |
if [[ $mem -gt 0 ]]; then | |
return $((mem * 100 / total)) | |
else | |
return 0 | |
fi |
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
" Put this in ~/.vim/after/syntax/python.vim | |
" Slight tweaks to https://lonelycoding.com/can-i-use-both-python-and-sql-syntax-highlighting-in-the-same-file-in-vim/ | |
" Needed to make syntax/sql.vim do something | |
unlet b:current_syntax | |
" Load SQL syntax | |
syntax include @SQL syntax/sql.vim |
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/env bash | |
# Cron to update the IPTables Blocker | |
# Now works with Raspberry Pi Raspbian Jessy | |
# Define some defaults | |
IPTABLES='/sbin/iptables' | |
BLOCKLIST='/tmp/enatec_blocked.txt' | |
# Get the latest List |
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/sh | |
# script to check for complete torrents in transmission folder, then stop and move them | |
# either hard-code the MOVEDIR variable here… | |
MOVEDIR=/home/mjdescy/media # the folder to move completed downloads to | |
# …or set MOVEDIR using the first command-line argument | |
# MOVEDIR=%1 | |
# use transmission-remote to get torrent list from transmission-remote list | |
# use sed to delete first / last line of output, and remove leading spaces | |
# use cut to get first field from each line |