Skip to content

Instantly share code, notes, and snippets.

@kevinxucs
kevinxucs / boost-1.53.0-universal-build-log
Last active December 12, 2015 06:09
Boost 1.53.0 universal build log
This file has been truncated, but you can view the full file.
╰─$ HOMEBREW_MAKE_JOBS=1 VERBOSE=1 brew install --universal boost
==> Downloading http://downloads.sourceforge.net/project/boost/boost/1.53.0/boost_1_53_0.tar.bz2
Already downloaded: /Library/Caches/Homebrew/boost-1.53.0.tar.bz2
/usr/bin/tar xf /Library/Caches/Homebrew/boost-1.53.0.tar.bz2
==> ./bootstrap.sh --prefix=/usr/local/Cellar/boost/1.53.0 --libdir=/usr/local/Cellar/boost/1.53.0/lib --without-icu
./bootstrap.sh --prefix=/usr/local/Cellar/boost/1.53.0 --libdir=/usr/local/Cellar/boost/1.53.0/lib --without-icu
-n Building Boost.Build engine with toolset darwin...
tools/build/v2/engine/bin.macosxx86_64/b2
-n Detecting Python version...
2.7
@kevinxucs
kevinxucs / pyqt-4.10.1-build-log
Created May 19, 2013 01:56
PyQt 4.10.1 build log
$ brew upgrade -v pyqt
==> Upgrading 1 outdated package, with result:
pyqt 4.10.1
==> Upgrading pyqt
rm /usr/local/bin/pyuic4
rm /usr/local/bin/pyrcc4
rm /usr/local/bin/pylupdate4
rm /usr/local/lib/python2.7/site-packages/PyQt4/uic/widget-plugins/qtwebkit.py
rm /usr/local/lib/python2.7/site-packages/PyQt4/uic/widget-plugins/qtdeclarative.py
rm /usr/local/lib/python2.7/site-packages/PyQt4/uic/widget-plugins/qscintilla.py
$ brew upgrade -v
==> Upgrading 1 outdated package, with result:
subversion 1.8.0
==> Upgrading subversion
rm /usr/local/bin/svnversion
rm /usr/local/bin/svnsync
rm /usr/local/bin/svnserve
rm /usr/local/bin/svnrdump
rm /usr/local/bin/svnraisetreeconflict
rm /usr/local/bin/svnmucc
@kevinxucs
kevinxucs / gmux-switch.c
Created May 11, 2014 07:05
Power down discrete graphic chip on apple gmux
#include <stdio.h>
#include <sys/io.h>
#define GMUX_PORT_SWITCH_DISPLAY 0x10
#define GMUX_PORT_SWITCH_DDC 0x28
#define GMUX_PORT_SWITCH_EXTERNAL 0x40
#define GMUX_PORT_DISCRETE_POWER 0x50
#define GMUX_PORT_VALUE 0xc2
#define GMUX_PORT_READ 0xd0
#define GMUX_PORT_WRITE 0xd4
@kevinxucs
kevinxucs / logcatapp.sh
Created May 23, 2014 01:43
Filter logcat by app package name
#!/bin/bash
usage() {
echo "Usage: $(basename $0) [package] ..."
}
app_package=$1
shift
if [ -z $app_package ]; then
@kevinxucs
kevinxucs / libpng-1.6.10-build-log
Last active August 29, 2015 14:02
libpng-1.6.10-build-log
~ $ brew install libpng --build-from-source -v
==> Downloading https://downloads.sf.net/project/libpng/libpng16/1.6.10/libpng-1.6.10.tar.gz
Already downloaded: /Library/Caches/Homebrew/libpng-1.6.10.tar.gz
==> Verifying libpng-1.6.10.tar.gz checksum
tar xf /Library/Caches/Homebrew/libpng-1.6.10.tar.gz
==> ./configure --disable-dependency-tracking --disable-silent-rules --prefix=/usr/local/Cellar/libpng/1.6.10
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... ./install-sh -c -d
checking for gawk... no
@kevinxucs
kevinxucs / gochroot
Last active January 5, 2023 22:51
chroot wrapper script
#!/bin/bash
# Change this to the parent folder that holds all chroots
CHROOT_ROOT=/scratch/chroot
# DO NOT CHANGE!
chrootname="$1"
chrootdir="$CHROOT_ROOT/$chrootname"
chrootlock="$CHROOT_ROOT/$chrootname.lock"
pid=$$
@kevinxucs
kevinxucs / hr
Last active August 29, 2015 14:08
HHVM Framework Test Runner
#!/bin/bash
# Change to match yours
FRAMEWORK="vfsstream"
HHVM_ROOT="/p/hhvm"
PHP_DBG="/p/php/5.6.2/bin/php"
ISSUE='^org\\bovigo\\vfs\\vfsStreamWrapperFlockTestCase::canRemoveLock$'
usage() {
echo >&2 "HHVM test runner"
@kevinxucs
kevinxucs / display_error
Created November 19, 2014 16:58
Attempted fix for display_error
--- a/hphp/runtime/ext/std/ext_std_misc.cpp
+++ b/hphp/runtime/ext/std/ext_std_misc.cpp
@@ -46,7 +46,7 @@ IMPLEMENT_THREAD_LOCAL(std::string, s_misc_highlight_default_default);
IMPLEMENT_THREAD_LOCAL(std::string, s_misc_highlight_default_html);
IMPLEMENT_THREAD_LOCAL(std::string, s_misc_display_errors);
-const std::string s_1("1"), s_2("2"), s_stdout("stdout"), s_stderr("stderr");
+const std::string s_0("0"), s_1("1"), s_2("2"), s_stdout("stdout"), s_stderr("stderr");
const double k_INF = std::numeric_limits<double>::infinity();
const double k_NAN = std::numeric_limits<double>::quiet_NaN();
@kevinxucs
kevinxucs / display_errors_test.php
Created November 20, 2014 05:18
Test display errors
<?php
var_dump(ini_get('display_errors'));
file_put_contents('vfs://test', 'test');
ini_set('display_errors', '0');
var_dump(ini_get('display_errors'));
file_put_contents('vfs://test', 'test');