Skip to content

Instantly share code, notes, and snippets.

@coregear
coregear / uninstall-hidden-offline-devices-in-windows.md
Created August 23, 2017 06:55 — forked from muink/uninstall-hidden-offline-devices-in-windows.md
windows删除/修改隐藏离线网卡设备方法

windows删除除/修改隐藏离线网卡设备方法

一.删除隐藏设备

  1. 打开命令提示符(cmd)
  2. 输入set devmgr_show_nonpresent_devices=1并回车
  3. 或添加环境变量 devmgr_show_nonpresent_devices 并将其值设为 1, 一次设置永久有效
  4. 输入start devmgmt.msc并回车
  5. 点开查看并勾选显示隐藏设备
  6. 卸载那些你想卸载的离线设备(半透明的设备)
@coregear
coregear / .gitignore
Created December 29, 2015 03:44 — forked from karmi/.gitignore
Example Nginx configurations for Elasticsearch
nginx/
!nginx/.gitkeep
!nginx/logs/.gitkeep
src/
tmp/
@coregear
coregear / nginx-elasticsearch-proxy.conf
Created December 29, 2015 03:42 — forked from karmi/nginx-elasticsearch-proxy.conf
Route requests to ElasticSearch to authenticated user's own index with an Nginx reverse-proxy
# Run me with:
#
# $ nginx -p /path/to/this/file/ -c nginx.conf
#
# All requests are then routed to authenticated user's index, so
#
# GET http://user:password@localhost:8080/_search?q=*
#
# is rewritten to:
#
@coregear
coregear / logstash.conf
Created November 12, 2015 10:00 — forked from markwalkom/logstash.conf
Reindexing Elasticsearch with Logstash 1.5
input {
elasticsearch {
hosts => [ "HOSTNAME_HERE" ]
port => "9200"
index => "INDEXNAME_HERE"
size => 1000
scroll => "5m"
docinfo => true
scan => true
}
@coregear
coregear / pamtest.py
Last active August 29, 2015 14:16 — forked from medigeek/pamtest.py
#!/usr/bin/python
# sudo ./pamtest.py <username>
# If your run this as root, you don't need authentication.
# Perfect for True or False (if user is allowed to login or not)
import sys
import PAM
from getpass import getpass
def pam_conv(auth, query_list, userData):
@coregear
coregear / nginx.conf
Last active August 29, 2015 14:16 — forked from dctrwatson/nginx.conf
user www-data;
worker_processes 4;
error_log /var/log/nginx/error.log;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
#!/bin/sh
# Converts a mysqldump file into a Sqlite 3 compatible file. It also extracts the MySQL `KEY xxxxx` from the
# CREATE block and create them in separate commands _after_ all the INSERTs.
# Awk is choosen because it's fast and portable. You can use gawk, original awk or even the lightning fast mawk.
# The mysqldump file is traversed only once.
# Usage: $ ./mysql2sqlite mysqldump-opts db-name | sqlite3 database.sqlite
# Example: $ ./mysql2sqlite --no-data -u root -pMySecretPassWord myDbase | sqlite3 database.sqlite