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 | |
| # by Paul Colby (http://colby.id.au), no rights reserved ;) | |
| PREV_TOTAL=0 | |
| PREV_IDLE=0 | |
| while true; do | |
| CPU=(`cat /proc/stat | grep '^cpu '`) # Get the total CPU statistics. | |
| unset CPU[0] # Discard the "cpu" prefix. | |
| IDLE=${CPU[4]} # Get the idle CPU time. |
| QVariantMap xmlStreamToVariant(QXmlStreamReader &xml, const QString &prefix = QLatin1String("."), const int maxDepth = 1024) | |
| { | |
| if (maxDepth < 0) { | |
| qWarning() << QObject::tr("max depth exceeded"); | |
| return QVariantMap(); | |
| } | |
| if (xml.hasError()) { | |
| qWarning() << xml.errorString(); | |
| return QVariantMap(); |
| 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 | |
| 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. |
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]
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; |
| #!/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` |