This file contains hidden or 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 | |
## trexprompt by Teranex (c) 2011 | |
## https://github.com/teranex/dotfiles/blob/master/bash/trexprompt | |
## https://budts.be/weblog/2011/04/my-bash-prompt/ | |
GIT_PS1_SHOWDIRTYSTATE=true | |
GIT_BRANCH_COLOR="\[\033[38;5;155m\]\[\033[48;5;235m\]" | |
PS1_EXIT_RED="\[\033[38;5;208m\]\[\033[48;5;52m\]" |
This file contains hidden or 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 | |
cd /opt | |
mkdir -p /opt/exa | |
cd /opt/exa | |
wget https://github.com/ogham/exa/releases/download/v0.10.1/exa-linux-x86_64-v0.10.1.zip | |
unzip exa-linux-x86_64-v0.10.1.zip | |
apt install -y bash-completion | |
cp /opt/exa/bin/exa /usr/local/bin/ | |
cp /opt/exa/man/exa* /usr/share/man/man1/ |
This file contains hidden or 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
apt-get -qq update ; apt-get -s dist-upgrade | grep "^Inst" | grep -i security | awk -F " " {'print $2'} | xargs apt-get -y install ; apt -y autoremove |
This file contains hidden or 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
/** | |
* jsFiddleConsole logger by kkobashi | |
* Make calls to the log method like this: | |
* jsFiddleConsole.log('hello'); | |
* jsFiddleConsole.log('world'); | |
* | |
* script originally from here: | |
* https://web.archive.org/web/20160614162940/ | |
* http://www.kobashicomputing.com:80/send-your-console-output-to-the-result-pane-in-jsfiddle | |
* (concat the above 2 lines for the archive.org copy) |
This file contains hidden or 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
db="" ; dbuser="" ; ARGS="--opt --skip-dump-date --order-by-primary" ; ts=$(date +%Y-%m-%d--%H%M%S) ; $(which mysqldump) -u${dbuser} -p${dbpw} ${ARGS} --database ${db} | sed 's$VALUES ($VALUES\n($g' | sed 's$),($),\n($g' > ${db}_${ts}.sql && bzip2 ${db}_${ts}.sql |
This file contains hidden or 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
<html> | |
<body> | |
<div class="card"> | |
<div class="card-bg"> | |
<div class="info"> | |
<div class="counter"> <span class="number"> 1 </div> | |
<div class="item"></div> |
This file contains hidden or 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
SELECT SUM(filesize)/(1024*1024*1024) FROM `mdl_files` WHERE `filename` LIKE '%mbz%' AND filearea = 'automated' |
This file contains hidden or 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
:::::::::::::::::::::::::::::::::::::::::::::::::::: | |
:: file: cdata_fix.bat | |
:: description: search+replace of Cp glossary xml to surround all definitions in cdata | |
:: tags in case of definitions including chars that Cp doesn't like | |
:: author: Matt Gleeson 2015 | |
:::::::::::::::::::::::::::::::::::::::::::::::::::: | |
@echo off | |
if exist ../Glossary_Terms_for_Cp.xml ( | |
SearchReplace.exe "<def>" "<def><![CDATA[" ../Glossary_Terms_for_Cp.xml > Glossary_Terms_for_Cp.xml.tmp | |
if %errorlevel% neq 0 goto :error |
This file contains hidden or 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
:::::::::::::::::::::::::::::::::::::::::::::::::::: | |
:: file: wmode_fix.bat | |
:: description: search+replace of SWF embed code published from Captivate to fix bug where HTML interactives disappear when clicked off in published SWFs | |
:: author: Matt Gleeson 2015 | |
:: requires: fnr.exe (https://findandreplace.codeplex.com/) | |
:::::::::::::::::::::::::::::::::::::::::::::::::::: | |
@echo off | |
set pwd="%cd%" | |
if exist fnr.exe ( | |
echo fnr --cl --find "so.addParam(\"wmode\", \"window" --replace "so.addParam(\"wmode\", \"transparent" --dir %pwd% --includeSubDirectories --fileMask "*.htm,*.html" |
This file contains hidden or 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 | |
############# | |
# install_latest_bitnami_lampstack.sh | |
# Fetches and installs most recent version of 64bit Linux Bitnami Lampstack | |
# @author Matt Gleeson <matt@mattgleeson.net> | |
# @version 0.00.001a not yet fully functional, haven't finished yet, just writing down the code somewhere while I'm thinking of it so I don't forget | |
# @license: GPL2 | |
############# | |
exit #remove this once it's more complete, just prevents running until it's more done-ish so it doesn't potentially do terrible things to your cat and abuse your mother and stuff |
NewerOlder