Skip to content

Instantly share code, notes, and snippets.

@YcSmile
YcSmile / cmakelists1.cmake
Last active March 13, 2019 13:12
[CMake 批量添加工程]CMake批量添加工程 #CMake #批量Cmake工程
#批量添加子文件工程
cmake_minimum_required(VERSION 3.5)
# 工程名称
project(DataStruct)
# 检索 CMAKE_SOURCE_DIR 下子文件夹名称
file(GLOB folders RELATIVE ${CMAKE_SOURCE_DIR} ${CMAKE_SOURCE_DIR}/*)
# 遍历子文件夹
@YcSmile
YcSmile / python_detectip.py
Created March 13, 2019 13:29
[侦测局域网ssh登录IP] #SSH #局域网SSH IP #多线程
#!/usr/bin/python3
# [usage]
# detectip 192.168.1 22 username
# passwd
# 安装 paramiko
# sudo apt-get install libffi-dev libssl-dev libxml2-dev libxslt1-dev libjpeg8-dev zlib1g-dev
# pip3 install paramiko
import threading
import paramiko
import sys
@YcSmile
YcSmile / note.txt
Created July 8, 2019 13:36
Linux 英文系统下,切换wps界面语言为中文
当前wps版本 11.1.0.8722
1 方法一
修改配置文件
nano ~/.config/Kingsoft/Office.conf
[General]
languages=
@YcSmile
YcSmile / 电子发烧友自动展开+免登录+去广告.Eelecfans.js
Last active August 27, 2019 10:54
电子发烧友自动展开+免登录+去广告.Eelecfans.js
// ==UserScript==
// @name 电子发烧友自动展开+免登录+去广告
// @namespace https://gist.github.com/YcSmile
// @version 0.1
// @description 电子发烧友自动展开+免登录+去广告-Jquery版本-Tampermonkey
// @author YcSmile
// @match *://*.elecfans.com/emb/*/*.html
// @match *://*.elecfans.com/d/*.html
// @grant none
// @icon http://www.elecfans.com/favicon.ico
@YcSmile
YcSmile / CSharp_GetDeviceName.md
Last active September 28, 2019 13:56
.NET 获取设备名称

https://bbs.csdn.net/topics/390453634

    /// <summary>
    /// 枚举win32 api
    /// </summary>
    public enum HardwareEnum
    {
        // 硬件
        Win32_Processor, // CPU 处理器

Win32_PhysicalMemory, // 物理内存条