Skip to content

Instantly share code, notes, and snippets.

View mickeyouyou's full-sized avatar
🌏
searching and reading

Zongbao Feng mickeyouyou

🌏
searching and reading
View GitHub Profile
package com.aust.zongbao.bmi2nd;
import android.app.Activity;
import android.app.AlertDialog;
import android.app.Notification;
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.content.Intent;
import android.content.SharedPreferences;
import android.net.Uri;

MacOS

Build 3059

MD5: 59bab8f71f8c096cd3f72cd73851515d

Rename it to: Sublime Text

Make it executable with: chmod u+x Sublime\ Text

tail -f `find ./ -name '*.log' -o -name '*.php'`
@mickeyouyou
mickeyouyou / create_stream_client.diff
Created September 8, 2015 12:54
创建stream context 的两种方式
$context = stream_context_create();
stream_context_set_option($context, 'ssl', 'local_cert', $this->certificate);
stream_context_set_option($context, 'ssl', 'passphrase', $this->passphrase);
$context = stream_context_create(array(
'ssl' => array(
'local_cert' => $this->certificateFile,
'passphrase' => $this->certificatePassPhrase
)
@mickeyouyou
mickeyouyou / mock_routing_request.py
Created February 9, 2018 07:09
mock_routing_request
waypoint = routing_request.waypoint.add()
waypoint.pose.x = 587696.82286
waypoint.pose.y = 4141446.66696
waypoint.id = '1-1'
waypoint.s = 1
waypoint = routing_request.waypoint.add()
waypoint.pose.x = 586948.740120
waypoint.pose.y = 4141171.118641
waypoint.id = '1-1'
@mickeyouyou
mickeyouyou / start_change.sh
Last active February 27, 2018 08:31
apollo sim
#! /bin/bash
source /home/caros/ros/setup.bash
export LD_LIBRARY_PATH=/apollo/modules/change:$LD_LIBRARY_PATH
/apollo/modules/change/change_node > /dev/null 2>&1 &
WAIT_TIME=0
while [[ `ps aux | grep -v grep | grep -v roslaunch | grep -c "change_node"` -le 0 ]]
do
sleep 1
@mickeyouyou
mickeyouyou / stop_change.sh
Created February 27, 2018 08:32
apollo stop_change.sh
#! /bin/bash
pkill -f change_node > /dev/null 2>&1 &
WAIT_TIME=0
while [[ `ps aux | grep -v grep | grep -c "change_node"` -gt 0 ]]
do
sleep 1
((WAIT_TIME++))
pkill -f change_node > /dev/null 2>&1 &
@mickeyouyou
mickeyouyou / git.diff
Last active April 5, 2019 15:44
cyber build between ubuntu 14.04 and Darwin
apollo@in_dev_docker:/apollo_lite$ git diff
diff --git a/WORKSPACE b/WORKSPACE
index 1098248..7caffb1 100644
--- a/WORKSPACE
+++ b/WORKSPACE
@@ -163,14 +163,27 @@ http_archive(
url = "https://github.com/google/protobuf/releases/download/v3.3.0/protobuf
)
-# rtps
diff -Npur -X ex.file a/cmake/dev/check_configuration.cmake b/cmake/dev/check_configuration.cmake
--- a/cmake/dev/check_configuration.cmake 2019-01-30 16:06:46.345544075 +0800
+++ b/cmake/dev/check_configuration.cmake 2019-01-30 16:12:27.917537958 +0800
@@ -14,6 +14,7 @@
macro(check_stdcxx)
# Check C++11
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g")
include(CheckCXXCompilerFlag)
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_CLANG OR
@mickeyouyou
mickeyouyou / duration.h
Created April 16, 2019 07:12
ros time implementation
00035 #ifndef _ROS_DURATION_H_
00036 #define _ROS_DURATION_H_
00037
00038 #include <math.h>
00039
00040 namespace ros {
00041
00042 void normalizeSecNSecSigned(long& sec, long& nsec);
00043
00044 class Duration