Skip to content

Instantly share code, notes, and snippets.

@wushian
wushian / README.md
Created February 25, 2023 03:34 — forked from gtzilla/README.md
The Scripts/Config files to Create a Wireless Access Point with traffic tunneled through a socks5 proxy. Running Debian Stretch Proxmox VE 5. Uses hostapd running proxmox

Wireless Access Point

The is a collection of files that I used to create a Wireless access point that tunnels traffic through a socks5 proxy using tun2socks, hostapd, dnsmasq. This was done on a debian system, specifically Proxmox VE. The underlying hardware is an Intel Nuc. The wireless card currently only handles wireless G traffic. Testing "a" wireless resulted in the wireless interface not coming up. This could be merely user error. More information on setting hg_mode in hostapd.conf

This took approximately two days to setup corretly. The tutorials that address how-to create an access point, as well as how-to use tun2socks varied considerably. I was finally able to cobble together a working prototype that is able to tunnel traffic from my wireless access point through any SSH connection that can enable socks5 proxy.

@wushian
wushian / apt-offline.md
Created July 26, 2021 03:15 — forked from ycku/apt-offline.md
記錄 apt-offline 的標準語法,在離線環境使用 apt

Advantages

  1. 相容原有的 source list
  2. 只下載需要安裝的套件
  3. 步驟單純

Goals

基本上就是處理下面三種(apt update, upgrade, install)需要網路的操作

  • online$: 表示在有對外網路的主機操作
  • offline$: 表示在無對外網路的主機操作
@wushian
wushian / PVE-HP-ssacli-smart-storage-admin.md
Created April 8, 2021 02:44 — forked from mrpeardotnet/PVE-HP-ssacli-smart-storage-admin.md
HP Smart Storage Admin CLI (ssacli) installation and usage on Proxmox PVE (6.x)

HP Smart Storage Admin CLI (ssacli) installation and usage on Proxmox PVE (6.x)

Why use HP Smart Storage Admin CLI?

You can use ssacli (smart storage administrator command line interface) tool to manage any of supported HP Smart Array Controllers in your Proxmox host without need to reboot your server to access Smart Storage Administrator in BIOS. That means no host downtime when managing your storage.

CLI is not as convenient as GUI interface provided by BIOS or desktop utilities, but still allows you to fully manage your controller, physical disks and logical drives on the fly with no Proxmox host downtime.

ssacli replaces older hpssacli, but shares the same syntax and adds support for newer servers and controllers.

Installation

@wushian
wushian / service.cs
Created July 12, 2018 14:11 — forked from cbkid/service.cs
使用C#代码安装 Windows 服务
using System;
using System.Collections.Generic;
using System.ServiceProcess;
using System.Configuration.Install;
static class Program
{
/// <summary>
/// 应用程序的主入口点。
/// </summary>
@wushian
wushian / VS2017ExtensionList.md
Created March 17, 2018 00:06 — forked from kkbruce/VS2017ExtensionList.md
Visual Studio 2017 Extension List

Visual Studio 2017 Extension List

  • Browser Reload on Save
  • ConEmuIntegration
  • Copy As Html
  • ConfigTransFormation
  • Custom Document Well
  • Double-Click Maxinize
  • EF Core Power Tools
  • GhostDoc Community for VS2017
@wushian
wushian / newTrendline.mq4
Created October 2, 2015 09:43 — forked from currencysecrets/newTrendline.mq4
New trend line script, returns the closest upper trend line and lowest trend line
extern int EXT_SWINGS = 2; // swing level, 0 is lowest, 2 is most common
extern int EXT_NO_SWING_LMT = 12; // don't consider the latest X bars as swing points to draw trend lines
extern int EXT_ATR = 300; // ATR(x)
extern double EXT_ATR_MAX_SLOPE = 0.05; // multiple of ATR that would be considered maximum slope
extern double EXT_ATR_BUFFER = 0.05; // multiple of ATR to add to low/high for it to be considered a "touch"
extern int EXT_NUM_CONSEC_CLOSES = 4; // number of consecutive closes beyond trend line to break
extern int EXT_NUM_TOUCHES = 3; // (inclusive) number of touches needed to be considered a valid trend line
extern int EXT_RES_COLOR = IndianRed; // horizontal resistance line http://docs.mql4.com/constants/colors
extern int EXT_SUP_COLOR = PaleGreen; // horizontal support line http://docs.mql4.com/constants/colors
extern int EXT_SLOPE_RES_COLOR = LightSalmon; // sloping resistance line http://docs.mql4.com/constants/colors
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Drawing.Imaging;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
namespace HexDigits.Drawing