Skip to content

Instantly share code, notes, and snippets.

@hanxue
hanxue / brew-cask-install-chrome-remote-desktop-host.log
Created October 16, 2014 04:27
Output of homebrew cask installing chrome remote desktop host
$ brew cask install chrome-remote-desktop-host --debug
==> Initializing Taps
==> Creating directories
==> Loading Cask definitions
==> Translating 'chrome-remote-desktop-host' into a valid Cask source
==> Testing source class Cask::Source::URI
==> Testing source class Cask::Source::PathSlashRequired
==> Testing source class Cask::Source::TappedQualified
==> Testing source class Cask::Source::UntappedQualified
==> Testing source class Cask::Source::Tapped
@hanxue
hanxue / abstract-php-version.rb
Created September 11, 2014 01:46
Failed to create homebrew PHP 5.2.9 formula
class AbstractPhpVersion < Formula
module PhpdbgDefs
PHPDBG_SRC_TARBAL = 'https://github.com/krakjoe/phpdbg/archive/v0.3.2.tar.gz'
PHPDBG_CHECKSUM = {
:md5 => '84255abff00fb31e338d03564c3cc4e4',
:sha1 => 'c57174ab235ec69997e1a37e6d2afe3e4edfb749',
:sha256 => 'feab6e29ef9a490aa53332fe014e8026d89d970acc5105f37330b2f31e711bbd',
}
end
[ 99%] Building CXX object hphp/runtime/ext_hhvm/CMakeFiles/ext_hhvm_static.dir/__/ext/CMakeFiles/hphp_runtime_ext.dir/zlib/ext_zlib.cpp.o.ext_hhvm.cpp.o
[100%] Building CXX object hphp/runtime/ext_hhvm/CMakeFiles/ext_hhvm_static.dir/__/ext/CMakeFiles/hphp_runtime_ext.dir/zlib/zip-file.cpp.o.ext_hhvm.cpp.o
[100%] Building CXX object hphp/runtime/ext_hhvm/CMakeFiles/ext_hhvm_static.dir/ext_hhvm_infotabs.cpp.o
Linking CXX static library libext_hhvm.a
[100%] Built target ext_hhvm_static
Scanning dependencies of target hhvm
[100%] [100%] Building CXX object hphp/hhvm/CMakeFiles/hhvm.dir/global-variables.cpp.o
[100%] Building CXX object hphp/hhvm/CMakeFiles/hhvm.dir/main.cpp.o
Building CXX object hphp/hhvm/CMakeFiles/hhvm.dir/process-init.cpp.o
Linking CXX executable hhvm
@hanxue
hanxue / QDAL-Framework-Distribution.xml
Last active August 29, 2015 14:03
OSX QGIS Installation Error - QDAL Framework
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<installer-script minSpecVersion="1.000000" authoringTool="com.apple.PackageMaker" authoringToolVersion="3.0.6" authoringToolBuild="201">
<title>QGIS</title>
<options customize="never" allow-external-scripts="no"/>
<domains enable_localSystem="true"/>
<installation-check script="pm_install_check();"/>
<script>function pm_install_check() {
if(!(/* >= */ system.compareVersions(system.version.ProductVersion, '10.7.0') >= 0)) {
my.result.title = 'Failure';
my.result.message = 'QGIS requires Mac OS X 10.7 or newer.';
@hanxue
hanxue / Scalatest.scala
Created June 26, 2014 06:17
Scalatest exception hexBinary needs to be even-length
import javax.xml.bind.DatatypeConverter
class Scalatest extends UnitSpec{
val expectedIp = "192.168.1.196"
val localIp = java.net.InetAddress.getLocalHost.getHostAddress
assume(localIp == expectedIp, "Currently P1Test is hardcoded to run from " + expectedIp)
"Correct heartbeat" should "return 1" in {
1.toByte should be (P1Test.sendAndReceive(P1Test.heartbeat)._1)
}
@hanxue
hanxue / brew-config.log
Last active August 29, 2015 14:03
Homebrew error building grass 6.4.3
$ brew --config
HOMEBREW_VERSION: 0.9.5
ORIGIN: https://github.com/Homebrew/homebrew.git
HEAD: b4684e760be0bcc05355b88c95178a79fe32f0fc
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
CPU: 8-core 64-bit ivybridge
OS X: 10.9.4-x86_64
Xcode: 5.1.1
CLT: 5.1.0.0.1.1396320587
@hanxue
hanxue / java.io.IOException-unable-to-delete-file.txt
Created June 20, 2014 10:21
GitBucket fail to delete file (delete repository) stack trace
java.io.IOException: Unable to delete file: C:\Users\ep\.gitbucket\repositories\user1\hanxue-debug.git\objects\pack\pack-77a7330a1fa2e4d7c170dd144cd3987185ebc9ae.pack
at org.apache.commons.io.FileUtils.forceDelete(FileUtils.java:2279)
at org.apache.commons.io.FileUtils.cleanDirectory(FileUtils.java:1653)
at org.apache.commons.io.FileUtils.deleteDirectory(FileUtils.java:1535)
at org.apache.commons.io.FileUtils.forceDelete(FileUtils.java:2270)
at org.apache.commons.io.FileUtils.cleanDirectory(FileUtils.java:1653)
at org.apache.commons.io.FileUtils.deleteDirectory(FileUtils.java:1535)
at org.apache.commons.io.FileUtils.forceDelete(FileUtils.java:2270)
at org.apache.commons.io.FileUtils.cleanDirectory(FileUtils.java:1653)
at org.apache.commons.io.FileUtils.deleteDirectory(FileUtils.java:1535)
@hanxue
hanxue / commands-to-build-sbt.sh
Last active August 29, 2015 14:02
Building sbt 0.13.5 fails
$ git clone git://github.com/sbt/sbt.git
$ cd sbt
$ git checkout v0.13.1
$ sbt --version
sbt launcher version 0.13.5
$ sbt
> publishLocal
@hanxue
hanxue / contents-of-lib-directory.txt
Last active June 10, 2022 18:28
scalatest sbt NoClassDefFoundError: sbt/testing/Framework
$ find . -name "*jar"
./lib/ant-1.7.1.jar
./lib/ant-launcher-1.7.1.jar
./lib/antlr-2.7.7.jar
./lib/aopalliance-1.0.jar
./lib/asm-4.1.jar
./lib/asm-all-4.1.jar
./lib/asm-analysis-4.1.jar
./lib/asm-tree-4.1.jar
./lib/asm-util-4.1.jar
@hanxue
hanxue / unzip-p.sh
Created June 17, 2014 09:53
Extract file from within jar archive
# This will extract the file MANIFEST.MF in directory META-INF, inside the sbt-launcher.jar file
$ unzip -p /usr/local/opt/sbt/libexec/sbt-launch.jar META-INF/MANIFEST.MF
Manifest-Version: 1.0
Implementation-Vendor: org.scala-sbt
Implementation-Title: Launcher
Implementation-Version: 0.13.2
Implementation-Vendor-Id: org.scala-sbt
Specification-Vendor: org.scala-sbt
Specification-Title: Launcher