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
# Xcode cli tools must be installed first, they have to be reinstalled after macOS version upgrades | |
xcode-select --install | |
# make sure Homebrew is up to date | |
brew update && brew upgrade | |
# change the version to be whichever one is failing | |
CFLAGS="-I$(xcrun --show-sdk-path)/usr/include" pyenv install -v 3.7.2 |
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
# found here: https://forums.macrumors.com/threads/el-capitan-bootable-dvd.1923931/#post-22036604 | |
hdiutil attach /Applications/Install\ OS\ X\ El\ Capitan.app/Contents/SharedSupport/InstallESD.dmg -noverify -nobrowse -mountpoint /Volumes/install_app | |
hdiutil convert /Volumes/install_app/BaseSystem.dmg -format UDSP -o /tmp/El\ Capitan | |
hdiutil resize -size 9g /tmp/El\ Capitan.sparseimage | |
hdiutil attach /tmp/El\ Capitan.sparseimage -noverify -nobrowse -mountpoint /Volumes/install_build | |
rm /Volumes/install_build/System/Installation/Packages | |
cp -rp /Volumes/install_app/Packages /Volumes/install_build/System/Installation/ | |
cp -rp /Volumes/install_app/BaseSystem.chunklist /Volumes/install_build | |
cp -rp /Volumes/install_app/BaseSystem.dmg /Volumes/install_build |
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
# $Id: screenrc,v 1.15 2003/10/08 11:39:03 zal Exp $ | |
# | |
# /etc/screenrc | |
# | |
# This is the system wide screenrc. | |
# | |
# You can use this file to change the default behavior of screen system wide | |
# or copy it to ~/.screenrc and use it as a starting point for your own | |
# settings. | |
# |
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 | |
ffmpeg -i “$1″ -acodec alac “`basename “$1″ .flac`.m4a” \ | |
-metadata title=\”"$(metaflac –show-tag=TITLE “$1″ | sed ‘s/title=//g’)”\” \ | |
-metadata author=\”"$(metaflac –show-tag=ARTIST “$1″ | sed ‘s/artist=//g’)”\” \ | |
-metadata album=\”"$(metaflac –show-tag=ALBUM “$1″ | sed ‘s/album=//g’)”\” \ | |
-metadata year=\”"$(metaflac –show-tag=DATE “$1″ | sed ‘s/date=//g’)”\” \ | |
-metadata track=\”"$(metaflac –show-tag=TRACKNUMBER “$1″ | sed ‘s/tracknumber=//g’)”\” \ | |
-metadata genre=\”"$(metaflac –show-tag=GENRE “$1″ | sed ‘s/genre=//g’)”\” |
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
on run | |
--edit this to be the correct location and file to run (typically only edit after the "drive_c") | |
set toRun to "$WINEPREFIX/drive_c/Program Files/MyProgram/MyProgramName.exe" | |
--edit winePrefix if you are not using the default prefix | |
set winePrefix to "$HOME/.wine" | |
--edit wineLocation if your wine install is not the default location | |
set wineLocation to "/usr/local/bin" |
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
import logging | |
import logging.handlers | |
# log file name and logging message level | |
log_file_name = 'loggingexample.log' | |
log_level = logging.INFO | |
# log record format string | |
format_string = '%(asctime)s %(name)s %(levelname)s %(message)s' | |
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
import logging | |
# change default log entry format, set filename and logging level | |
logging.basicConfig(level=logging.INFO, format="%(asctime)s %(levelname)s %(message)s", filename="example.log") | |
logging.info("Started") | |
logging.info("This is an example entry") | |
logging.debug("This line won't get logged as the log level is INFO") | |
logging.info("Done.") | |
# perform an orderly shutdown by flushing and closing all handlers; called at application exit and no further use of the logging system should be made after this call. | |
logging.shutdown() |
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
rem cd to the full repo directory | |
cd path\to\full_repo | |
rem export tracked files in sub directory by creating a filemap using an intermediary temp file | |
set SUBDIR=name_of_subdir | |
hg locate -I "%SUBDIR%" > ..\filemap.tmp | |
for /f "tokens=*" %A in (..\filemap.tmp) do @echo include %A >> ..\filemap.txt | |
echo rename "%SUBDIR%" . >> ..\filemap.txt | |
del ..\filemap.tmp |
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
# cd to the full repo directory | |
cd path/to/full_repo | |
# export tracked files in sub directory by creating a filemap | |
export SUBDIR=name_of_subdir | |
hg locate -I "$SUBDIR" | awk '{print "include \"" $1 "\"";}' > ../filemap.txt | |
echo "rename \"$SUBDIR\" ." >> ../filemap.txt | |
# create new repo using filemap | |
hg convert --filemap ../filemap.txt . ../new_repo_name |
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 sh | |
# check if share is mounted, attempt recovery and remount | |
if [ -z "$1" ]; then | |
echo "Usage: $0 /mount/point/to/check" | |
exit 0 | |
fi | |
DIR="$1" |
NewerOlder