Skip to content

Instantly share code, notes, and snippets.

@kevinxucs
kevinxucs / streaming_log.txt
Created October 12, 2018 03:51
Steam streaming log - 1440p issue
[2018-10-11 20:45:19] Streaming started to NVIDIA SHIELD Android TV Android 8.0.0 at 172.31.1.48:34956, audio channels = 8, MTU = 1468
[2018-10-11 20:45:19] Streaming quality: k_EStreamQualityBeautiful
[2018-10-11 20:45:19] Streaming bitrate: Unlimited
[2018-10-11 20:45:19] Maximum capture: 3840x2160 58.75 FPS
[2018-10-11 20:45:19] Video Streaming: enabled
[2018-10-11 20:45:19] Audio Streaming: enabled
[2018-10-11 20:45:19] Input Streaming: enabled
[2018-10-11 20:45:19] =====================================================================
@kevinxucs
kevinxucs / 01.cmake
Created December 5, 2014 19:50
weechat-1.0.1-build-log
2014-12-05 14:49:29 -0500
cmake
-DCMAKE_INSTALL_PREFIX=/usr/local/Cellar/weechat/1.0.1
-DCMAKE_BUILD_TYPE=None
-DCMAKE_FIND_FRAMEWORK=LAST
-DCMAKE_VERBOSE_MAKEFILE=ON
-Wno-dev
-DPREFIX=/usr/local/Cellar/weechat/1.0.1
-DENABLE_GTK=OFF
@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');
@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 / 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 / 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 / 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 / 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 / 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
$ 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