Skip to content

Instantly share code, notes, and snippets.

View liviaerxin's full-sized avatar

Frank liviaerxin

  • ASTRI
  • Hong Kong
View GitHub Profile
@liviaerxin
liviaerxin / README.md
Created December 15, 2017 02:22 — forked from mariotacke/README.md
Default nginx log format (combined) and grok pattern
@liviaerxin
liviaerxin / pom.xml
Created November 12, 2018 09:38 — forked from timmolderez/pom.xml
Adding dependencies to local .jar files in pom.xml
If you'd like to use a .jar file in your project, but it's not available in any Maven repository,
you can get around this by creating your own local repository. This is done as follows:
1 - To configure the local repository, add the following section to your pom.xml (inside the <project> tag):
<repositories>
<repository>
<id>in-project</id>
<name>In Project Repo</name>
<url>file://${project.basedir}/libs</url>
This file has been truncated, but you can view the full file.
{"dependencies_cache": {"https://packagecontrol.io/repository.json": [{"load_order": "50", "releases": [{"version": "3.12.0", "platforms": ["*"], "url": "https://codeload.github.com/packagecontrol/pyyaml/zip/v3.12.0", "sublime_text": "*"}], "description": "Python PyYAML module", "name": "pyyaml", "authors": ["FichteFoll"], "issues": "https://github.com/packagecontrol/pyyaml/issues"}, {"load_order": "50", "releases": [{"version": "1.7.4", "platforms": ["*"], "url": "https://codeload.github.com/idleberg/sublime-dicttoxml/zip/1.7.4", "sublime_text": "*"}], "description": "Converts a Python dictionary or other native data type into a valid XML string - https://github.com/idleberg/sublime-dicttoxml", "name": "dicttoxml", "authors": ["idleberg"], "issues": "https://github.com/idleberg/sublime-dicttoxml/issues"}, {"load_order": "01", "releases": [{"version": "1.0.1", "platforms": ["linux"], "url": "https://codeload.github.com/codexns/sublime-ctypes/zip/1.0.1", "sublime_text": "<3000"}], "description": "Python _ctype
/**
* @author knee-cola / https://github.com/knee-cola
* Original file URL: https://gist.github.com/knee-cola/37875bc4359609b96c9f329cd2a68fa1
*
* This is a spinner/loader built for Three.js platform.
* It can be used to notify user that some resources are being loaded.
* I made it to replace pure CSS spinner, which was displayed in the
* overlay above the 3D animation, since it was slowing down WebGL
*
* How to use:
from __future__ import print_function
import argparse
import time
import numpy as np
from scipy.misc import imread
import grpc
from tensorflow.contrib.util import make_tensor_proto
@liviaerxin
liviaerxin / hack_tensorflow_import_in_jetson_nano.py
Last active July 23, 2020 02:25
Hack Python Imported Module
# hack tensorflow.compat.v2 imported module name as tensorflow
# first
import sys
import importlib.util
name = "tensorflow.compat.v2"
spec = importlib.util.find_spec(name)
if spec is None:
print(f"can't find the {name} module")
else:
@liviaerxin
liviaerxin / deepstream_pipeline_samples.md
Last active July 23, 2020 05:08
DeepStream Pipeline Samples

DeepStream Pipelien Samples

Test on Jetson Nano with DeepStream SDK 5.0.

@liviaerxin
liviaerxin / an_executable_linking_shared_lib_by_using_@rpath_@executable_path.md
Created May 10, 2021 15:52
An executable link a shared library by setting @rpath, @executable_path during `clang` linking stage without using `install_name_tool` to hack

Original documents in clang, change dependent shared library install name at link time I've been hitting my head against this for some time and think I have finally figured out how to do this without using install_name_tool, at least for Mac OS 10.9 and later (as far as I've tested).

While you may have already figured this out, I'm posting it here in case anyone else needs it.

Basically you have two options:

  1. You can do it when you compile the library, defining its install_name in terms of @executable_path