TODO
eg
# sudo yum install git || sudo apt-get install git
git clone https://gist.github.com/9ca8b78f57ed5af5e40d.git bootstrap
pushd bootstrap
bash './Bootstrap ....sh'
popd
#!/bin/bash | |
if [ $# -lt 2 ]; then | |
echo "Usage: `basename $0 .sh` github-username github-project-name" >&2 | |
exit 1 | |
fi | |
# @brief Generate Markdown. | |
# @param $1 Image alt text. | |
# @param $2 Image URL. |
TODO
eg
# sudo yum install git || sudo apt-get install git
git clone https://gist.github.com/9ca8b78f57ed5af5e40d.git bootstrap
pushd bootstrap
bash './Bootstrap ....sh'
popd
#!/bin/bash | |
declare -A CC CXX SPEC | |
CC=( [clang]=clang [gcc]=gcc ) | |
CXX=( [clang]=clang++ [gcc]=g++ ) | |
SPEC=( [clang]=clang [gcc]=g++ ) | |
SOURCE_DIR=`pwd` | |
TOPDIR=~/tmp/build |
// Usage: QCOMPARE(PrintableVariant(v1), PrintableVariant(v2)); | |
// Note, QTest will still limit output to 1024 chars in QTestResult::compare | |
class PrintableVariant : public QVariant { | |
public: PrintableVariant(const QVariant &other) : QVariant(other) { } | |
}; | |
namespace QTest { | |
template<> char *toString(const PrintableVariant &variant){ | |
QString string; |
sudo yum install php php-pear | |
sudo pear channel-discover guzzlephp.org/pear | |
sudo pear channel-discover pear.amazonwebservices.com | |
sudo pear channel-discover pear.symfony.com | |
sudo pear install aws/sdk |
mkdir -p ~/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS} | |
echo '%_topdir %(echo $HOME)/rpmbuild' > ~/.rpmmacros |
#!/bin/bash | |
COLLECTIONS_DIR=~/.kodi/addons/screensaver.video/resources/collections | |
VIDEOS_DIR=~/.kodi/userdata/addon_data/screensaver.video/videos | |
while IFS= read -d '' -r COLLECTION; do | |
echo "$COLLECTION" | |
VIDEOS=`awk 'BEGIN{FS="[<>]";OFS="|"}{if($2=="filename")FILENAME=$3;if($2=="primary")print FILENAME,$3}' "$COLLECTION"` | |
for VIDEO in ${VIDEOS[@]}; do | |
FILENAME=`echo "$VIDEO" | cut -d'|' -f1` |
sudo sed -re 's/.*((\w{5}-){4}\w{5}).*/\1\n/' /sys/firmware/acpi/tables/MSDM |
Just some notes on my XPS 13 (9343) setup.
See also mpalourdio/xps13.
DP-1
-> DP-1-1
-> DP-1-1-1: Dell 2007FPB (Left) [eVGA DP3]
-> DP-1-1-2: Dell 2007FPB (Right) [eVGA DP2]
-> DP-1-2: Dell U3014 (Middle) [eVGA DP1]
#!/bin/bash | |
DEVICE=/dev/cdrom | |
DD=`which dd` || { echo 'Required command not found: dd' >&2; exit 1; } | |
ISOINFO=`which isoinfo` || { echo 'Required command not found: isoinfo' >&2; exit 1; } | |
SED=`which sed` || { echo 'Required command not found: sed' >&2; exit 1; } | |
LABEL=`"$ISOINFO" -d -i "$DEVICE" | "$SED" -nre 's/^Volume id: //p'` | |
BLOCK_SIZE=`"$ISOINFO" -d -i "$DEVICE" | "$SED" -nre 's/^Logical block size is: //p'` |