Skip to content

Instantly share code, notes, and snippets.

View divoxx's full-sized avatar

Rodrigo Kochenburger divoxx

  • Doximity
  • San Francisco, CA
View GitHub Profile
@divoxx
divoxx / is_writeable.sh
Last active November 26, 2018 21:51
Bash function to tell if a path is writeable by current user
_is_writeable() {
if [[ "$(uname)" == "Darwin" ]]; then
mapfile -d $' ' -t stat < <(stat -L -f '%p %g %u' "${1}")
else
mapfile -d $' ' -t stat < <(stat -L -c '%a %g %u' "${1}")
fi
declare -i prm=${stat[0]}
declare -i grp=${stat[1]}
declare -i own=${stat[2]}
@divoxx
divoxx / build.log
Last active April 4, 2018 21:42
electron build failure
This file has been truncated, but you can view the full file.
* Package: dev-util/electron-1.7.13
* Repository: atom
* Maintainer: elvis@magic.io proxy-maint@gentoo.org
* USE: abi_x86_64 amd64 elibc_glibc gnome-keyring gtk3 kernel_linux l10n_am l10n_ar l10n_bg l10n_bn l10n_ca l10n_cs l10n_da l10n_de l10n_el l10n_en-GB l10n_es l10n_es-419 l10n_et l10n_fa l10n_fi l10n_fil l10n_fr l10n_gu l10n_he l10n_hi l10n_hr l10n_hu l10n_id l10n_it l10n_ja l10n_kn l10n_ko l10n_lt l10n_lv l10n_ml l10n_mr l10n_ms l10n_nb l10n_nl l10n_pl l10n_pt-BR l10n_pt-PT l10n_ro l10n_ru l10n_sk l10n_sl l10n_sr l10n_sv l10n_sw l10n_ta l10n_te l10n_th l10n_tr l10n_uk l10n_vi l10n_zh-CN l10n_zh-TW proprietary-codecs pulseaudio system-ffmpeg tcmalloc userland_GNU
* FEATURES: preserve-libs sandbox userpriv usersandbox
* Checking for at least 3 GiB RAM ...
[ ok ]
* Checking for at least 5 GiB disk space at "/var/tmp/portage/dev-util/electron-1.7.13/temp" ...
[ ok ]
* Determining the location of the kernel source code
$ sudo emerge -va adobe-flash
These are the packages that would be merged, in order:
Calculating dependencies... done!
[ebuild U ] www-plugins/adobe-flash-27.0.0.183:22::gentoo [27.0.0.130-r1:22::gentoo] USE="nsplugin ppapi" ABI_X86="64 -32 (-x32)" 18,056 KiB
Total: 1 package (1 upgrade), Size of downloads: 18,056 KiB
Would you like to merge these packages? [Yes/No] yes
$ ls -ld ~/Gentoo/tmp/lib/libz.so.1.2.6
-rwxr-xr-x 1 divoxx staff 88380 Mar 28 11:41 Gentoo/tmp/lib/libz.so.1.2.6
* Package: dev-qt/qtcore-5.5.1-r1
* Repository: local
* USE: abi_x86_64 amd64 elibc_glibc icu kernel_linux userland_GNU
* FEATURES: preserve-libs sandbox userpriv usersandbox
>>> Unpacking source...
>>> Unpacking qtbase-opensource-src-5.5.1.tar.xz to /var/tmp/portage/dev-qt/qtcore-5.5.1-r1/work
>>> Source unpacked in /var/tmp/portage/dev-qt/qtcore-5.5.1-r1/work
>>> Preparing source in /var/tmp/portage/dev-qt/qtcore-5.5.1-r1/work/qtbase-opensource-src-5.5.1 ...
* Applying qtcore-5.5.1-qatomic_ia64.h.patch ... [ ok ]
* Applying qtcore-5.5.1-libsystemd.patch ...
class Foo
@@mutex = Mutex.new
def self.something
@@mutex.synchronize do
return @something if defined?(@something)
@something = init_here
end
end
end
def stop
@exit = 1
raise "ERROR"
end
def start
i = 0
trap("TERM") { stop }
divoxx godoc $ go build -x
WORK=/var/folders/02/sk3qr15j0xngfngjl7g0tkgw0000gn/T/go-build205772718
mkdir -p $WORK/code.google.com/p/go.tools/cmd/godoc/_obj/
mkdir -p $WORK/code.google.com/p/go.tools/cmd/godoc/_obj/exe/
cd /Users/divoxx/Projects/gopath/src/code.google.com/p/go.tools/cmd/godoc
/usr/local/Cellar/go/1.2/libexec/pkg/tool/darwin_amd64/6g -o $WORK/code.google.com/p/go.tools/cmd/godoc/_obj/_go_.6 -p code.google.com/p/go.tools/cmd/godoc -complete -D _/Users/divoxx/Projects/gopath/src/code.google.com/p/go.tools/cmd/godoc -I $WORK -I /Users/divoxx/Projects/gopath/pkg/darwin_amd64 ./blog.go ./codewalk.go ./doc.go ./handlers.go ./main.go ./play.go ./remotesearch.go
/usr/local/Cellar/go/1.2/libexec/pkg/tool/darwin_amd64/pack grcP $WORK $WORK/code.google.com/p/go.tools/cmd/godoc.a $WORK/code.google.com/p/go.tools/cmd/godoc/_obj/_go_.6
cd .
/usr/local/Cellar/go/1.2/libexec/pkg/tool/darwin_amd64/6l -o $WORK/code.google.com/p/go.tools/cmd/godoc/_obj/exe/a.out -L $WORK -L /Users/divoxx/Projects/gopath/pkg/darwi
# Building C bootstrap tool.
cmd/dist
# Building compilers and Go bootstrap tool for host, darwin/amd64.
lib9
libbio
libmach
misc/pprof
cmd/addr2line
cmd/nm
--- FAIL: TestUpdateUser (0.00 seconds)
panic: illegal base64 data at input byte 0 [recovered]
panic: illegal base64 data at input byte 0
goroutine 4 [running]:
testing.func·004()
/usr/local/Cellar/go/1.1.2/libexec/src/pkg/testing/testing.go:348 +0xcd
github.com/doximity/auth-api/foo.UpdateUser(0xc2000b0c40, 0xc2000c14c0, 0xc2000b1410)
/Users/divoxx/Projects/gopath/src/github.com/doximity/auth-api/foo/foo.go:26 +0x122
net/http.HandlerFunc.ServeHTTP(0x2d2398, 0xc2000b0c40, 0xc2000c14c0, 0xc2000b1410)