This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
cd `dirname $0`/.. | |
PROJECT_ROOT=$PWD | |
OPENCV_VERSION=3.4.1 | |
if [ "Darwin" = `uname -s` ]; then | |
HOST_ARCH=macosx | |
elif [ "Linux" = `uname -s` ]; then | |
HOST_ARCH=linux |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## profile | |
export HISTSIZE=2000000 | |
export HISTFILESIZE=20000000 | |
export ANDROID_ADB_SERVER_PORT=25037 | |
export JAVA_HOME=${HOME}/opt/android-studio/jre | |
export ANDROID_HOME=${HOME}/Android/Sdk | |
export GOROOT=${HOME}/opt/go | |
export GOPATH=${HOME} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
This example code is in the Public Domain (or CC0 licensed, at your option.) | |
Unless required by applicable law or agreed to in writing, this | |
software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR | |
CONDITIONS OF ANY KIND, either express or implied. | |
*/ | |
/**************************************************************************** | |
* | |
* This file is for gatt server. It can send adv data, be connected by client. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<application> | |
<component name="ActionMacroManager"> | |
<macro name="Reformat and Optimize import and Save"> | |
<action id="ReformatCode" /> | |
<action id="OptimizeImports" /> | |
<action id="SaveAll" /> | |
</macro> | |
</component> | |
</application> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Replace all keybind of IntelliJ (including android studio) | |
# meta <> control | |
# | |
# How to use | |
# | |
# extract original keymaps from resource.jar | |
# $ unzip $PATH_TO_INTELLI_J/lib/resources.jar keymaps/\* | |
# $ python android_studio_swap_key.py -i keymaps/Mac\ OS\ X\ 10.5+.xml -o swapped.xml | |
import xml.etree.ElementTree as ET |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<BLEDevice.h> | |
#include<BLEHIDDevice.h> | |
BLEServer* gBLEServer; | |
BLEHIDDevice* gBLEHIDDevice; | |
BLECharacteristic* gBLECharacteristic; | |
class MyServerCallbacks: public BLEServerCallbacks { | |
public: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE TEMPORARY FUNCTION GET_PARAMS_FROM_QUERY_STRING(query_str STRING, key_name STRING) | |
RETURNS STRING | |
LANGUAGE js AS """ | |
if (query_str == null) { return null; } | |
var start = 0; | |
while (0 <= start && start < query_str.length) { | |
var end = query_str.indexOf('&', start + 1); | |
if (end < 0) { end = query_str.length } | |
var p = query_str.indexOf('=', start); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
if [ -z "$1" ]; then | |
echo "USAGE: dumphprof <package_name> [<out_file>]" | |
exit 1 | |
fi | |
date=`date '+%Y%m%d%H%M%S'` | |
temp_file="$1_${date}_orig.hprof" | |
output_file="$1_${date}.hprof" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/usr/share/X11/xorg.conf.d/70-synaptics.conf | |
Section "InputClass" | |
Identifier "touchpad catchall" | |
Driver "synaptics" | |
MatchIsTouchpad "on" | |
# This option is recommend on all Linux systems using evdev, but cannot be | |
# enabled by default. See the following link for details: | |
# http://who-t.blogspot.com/2010/11/how-to-ignore-configuration-errors.html | |
# MatchDevicePath "/dev/input/event*" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Acer | |
SUBSYSTEM=="usb", ATTR{idVendor}=="0502", MODE="0660", GROUP="plugdev" | |
# ASUS | |
SUBSYSTEM=="usb", ATTR{idVendor}=="0b05", MODE="0660", GROUP="plugdev" | |
# Dell | |
SUBSYSTEM=="usb", ATTR{idVendor}=="413c", MODE="0660", GROUP="plugdev" | |
# Foxconn | |
SUBSYSTEM=="usb", ATTR{idVendor}=="0489", MODE="0660", GROUP="plugdev" | |
# Fujitsu | |
SUBSYSTEM=="usb", ATTR{idVendor}=="04c5", MODE="0660", GROUP="plugdev" |