Skip to content

Instantly share code, notes, and snippets.

@hanxue
hanxue / protobuf-2.5.0.spec
Created Jun 18, 2020
Protobuf 2.5.0 and 3.5.0 RPM spec files
View protobuf-2.5.0.spec
# Build -python subpackage
%bcond_without python
# Build -java subpackage
%bcond_without java
# Don't require gtest
%bcond_with gtest
%if %{with python}
%define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")
%endif
@hanxue
hanxue / degreed_bookmarklet.js
Created Apr 14, 2020
Degreed browser bookmarklet
View degreed_bookmarklet.js
javascript: void((function(d) {
var e = d.createElement('script');
e.setAttribute('type', 'text/javascript');
e.setAttribute('charset', 'UTF-8');
e.setAttribute('src', 'https://prod.degreedcdn.com/scripts/button/dist/launcher.min.js?prod=true&v=1059425550&r=' + Math.random() * 99999999);
d.getElementsByTagName('body')[0].appendChild(e)
})(document));
View docker_run_options.sh
usage() {
cat >&2 <<EOF
Usage: $0 COMMAND
Commands:
[ cpu | gpu ] [-d] [-X]
EOF
exit 1
}
@hanxue
hanxue / mv-bash-command.sh
Last active Aug 30, 2019
List of Waymo datasets
View mv-bash-command.sh
for FILE in *.tar*; do mv "$FILE" "${FILE%%\?*}"; done
@hanxue
hanxue / Dockerfile
Last active Aug 27, 2019
Dockerfile for Petalinux 2019.1
View Dockerfile
FROM ubuntu:18.04
#RUN dpkg --add-architecture i386
RUN apt-get update
RUN apt-get install -y tofrodos
RUN apt-get install -y iproute2
RUN apt-get install -y gawk
RUN apt-get install -y xvfb
RUN apt-get install -y gcc-4.8
RUN apt-get install -y git
@hanxue
hanxue / Dockerfile
Last active Aug 27, 2019
Petalinux 2019.1 Docker
View Dockerfile
FROM ubuntu:18.04
#RUN dpkg --add-architecture i386
RUN apt-get update
RUN apt-get install -y tofrodos
RUN apt-get install -y iproute2
RUN apt-get install -y gawk
RUN apt-get install -y xvfb
RUN apt-get install -y gcc-4.8
RUN apt-get install -y git
@hanxue
hanxue / epel-7-metalink.xml
Created Aug 19, 2019
EPEL 7 repo metadata metalink XML
View epel-7-metalink.xml
@hanxue
hanxue / pip-install-incremental.log
Created Jul 24, 2019
Error when installing pip from internal company mirror
View pip-install-incremental.log
2019-07-24T10:43:08 Created temporary directory: /tmp/pip-ephem-wheel-cache-zfy6r984
2019-07-24T10:43:08 Created temporary directory: /tmp/pip-req-tracker-y8w02b9g
2019-07-24T10:43:08 Created requirements tracker '/tmp/pip-req-tracker-y8w02b9g'
2019-07-24T10:43:08 Created temporary directory: /tmp/pip-install-_1o7olfy
2019-07-24T10:43:08 Looking in indexes: https://pipmirror.company.com/simple
2019-07-24T10:43:08 Collecting scrapy
2019-07-24T10:43:08 1 location(s) to search for versions of scrapy:
2019-07-24T10:43:08 * https://pipmirror.company.com/simple/scrapy/
2019-07-24T10:43:08 Getting page https://pipmirror.company.com/simple/scrapy/
2019-07-24T10:43:08 Analyzing links from page https://pipmirror.company.com/simple/scrapy/
@hanxue
hanxue / # bsdmake - 2019-07-17_00-29-53.txt
Created Jul 17, 2019
bsdmake on "Red Hat Enterprise Linux Workstation release 6.8 (Santiago)" - Homebrew build logs
View # bsdmake - 2019-07-17_00-29-53.txt
Homebrew build logs for bsdmake on "Red Hat Enterprise Linux Workstation release 6.8 (Santiago)"
Build date: 2019-07-17 00:29:53
@hanxue
hanxue / # go - 2019-07-09_02-59-44.txt
Created Jul 9, 2019
go on "CentOS Linux release 7.4.1708 (Core) " - Homebrew build logs
View # go - 2019-07-09_02-59-44.txt
Homebrew build logs for go on "CentOS Linux release 7.4.1708 (Core) "
Build date: 2019-07-09 02:59:44
You can’t perform that action at this time.