Skip to content

Instantly share code, notes, and snippets.

View JinnLynn's full-sized avatar

Jian Lin JinnLynn

View GitHub Profile
@JinnLynn
JinnLynn / string.cpp
Last active April 2, 2019 02:03
C# String std::string
using System;
#define s2S(s) gcnew String(s.c_str())
//REF: https://msdn.microsoft.com/en-us/library/1b4az623.aspx
string S2s(String ^s) {
using namespace Runtime::InteropServices;
const char* chars =
(const char*)(Marshal::StringToHGlobalAnsi(s)).ToPointer();
string ret = chars;
@JinnLynn
JinnLynn / aliyun-cleanup.sh
Last active September 24, 2019 07:14
Aliyun Cleanup
#!/usr/bin/env bash
curl -Lso- http://update.aegis.aliyun.com/download/uninstall.sh | bash
curl -Lso- http://update.aegis.aliyun.com/download/quartz_uninstall.sh | bash
pkill aliyun-service
rm -rf /etc/init.d/agentwatch /usr/sbin/aliyun-service /usr/local/aegis*
[[ -f /usr/local/cloudmonitor/CmsGoAgent.linux-amd64 ]] && {
/usr/local/cloudmonitor/CmsGoAgent.linux-amd64 stop