Skip to content

Instantly share code, notes, and snippets.

@codeRhythm
codeRhythm / golang-snmp-performance-test.md
Last active December 22, 2018 00:42
golang-snmp-performance-test

snmpv3

目前支持snmpv3的主要有2个库,star都很少。

github.com/soniah/gosnmp 293star

github.com/k-sone/snmpgo 73star

github.com/isalgueiro/otilio 7star(使用的是gosnmp)

#include <linux/module.h>
#include <linux/init.h>
#include <linux/kthread.h>
#include <linux/delay.h>
struct task_struct* ts;
static int thread_func(void)
{
while (1)
@codeRhythm
codeRhythm / cuda_installation_on_ubuntu_18.04
Created September 8, 2018 16:07 — forked from Mahedi-61/cuda_11.8_installation_on_Ubuntu_22.04
cuda 9.0 complete installation procedure for ubuntu 18.04 LTS
#!/bin/bash
## This gist contains step by step instructions to install cuda v9.0 and cudnn 7.2 in ubuntu 18.04
### steps ####
# verify the system has a cuda-capable gpu
# download and install the nvidia cuda toolkit and cudnn
# setup environmental variables
# verify the installation
###
string s = "\r\n\t \t这是随便写的一句话。\t\t ";
  
size_t n = s.find_last_not_of( " \r\n\t" );
if( n != string::npos )
{
    s.erase( n + 1 , s.size() - n );
}
  
n = s.find_first_not_of ( " \r\n\t" );
@codeRhythm
codeRhythm / sleep_for_c++.md
Created August 28, 2018 03:56
using sleep_for

using sleep_for

// thread::get_id / this_thread::get_id
#include <iostream>       // std::cout
#include <thread>         // std::thread, std::thread::id, std::this_thread::get_id
#include <chrono>         // std::chrono::seconds
using namespace std;
void show(int n) {
  if (n==5){
 cout&lt;&lt;"start n=5"&lt;
@codeRhythm
codeRhythm / install-esxi-on-8168-8111-NIC.md
Created August 26, 2018 08:57
在RTL8168/8111网卡的家用电脑上面安装ESXi

今天尝试在占美电脑上安装esxi,报错。

查了下网卡型号,对应型号是: Realtek RTL8168/8111 PCI-E Gigabit Ethernet NIC

esxi为了防止在家用电脑上面使用,就在5.5之后的版本移除了等网卡型号的驱动,并把这些网卡列入了黑名单。 安装方法: 1.把驱动写入自定义镜像

2.下载合入常见驱动的iso

@codeRhythm
codeRhythm / java
Created August 24, 2018 15:31 — forked from Macrow/java
Android studio 统一替换JCenter为国内阿里云maven
摘要: jcenter替换为国内阿里云maven地址
在你的USER_HOME/.gradle/目录下,新建一个文件init.gradle
把这一段内容拷贝进去
@codeRhythm
codeRhythm / merlin路由器常用链接.md
Last active March 11, 2023 14:57
梅林路由器设置反向代理,内网穿透
@codeRhythm
codeRhythm / config-adb-shell-in-cygwin.md
Last active May 15, 2020 10:57
cygwin "adb shell"配置

配置cygwin的ssh server

修改~/.bashrc

alias adbshell='stty -icanon -echo -echoe intr ^0 ; adb shell ; stty sane'

或者

adb() {
 if [[ $@ == "shell" ]]; then

Build tensorflow on OSX with NVIDIA CUDA support (GPU acceleration)

These instructions are based on Mistobaan's gist but expanded and updated to work with the latest tensorflow OSX CUDA PR.

Requirements

OS X 10.10 (Yosemite) or newer