Skip to content

Instantly share code, notes, and snippets.

View fpGHwd's full-sized avatar
🎯
Focusing

Melt fpGHwd

🎯
Focusing
View GitHub Profile
@fpGHwd
fpGHwd / c# 字节数组转16进制字符串.cs
Created November 11, 2015 06:22
c# byte to hex string
/// <summary>
/// 字节数组转16进制字符串
/// </summary>
/// <param name="bytes"></param>
/// <returns></returns>
public static string byteToHexStr(byte[] bytes)
{
string returnStr = "";
if (bytes != null)
{
@fpGHwd
fpGHwd / c# 字符串转16进制字节数组
Last active November 9, 2020 12:27
c# string to hex byte
/// <summary>
/// 字符串转16进制字节数组
/// </summary>
/// <param name="hexString"></param>
/// <returns></returns>
private static byte[] strToToHexByte(string hexString)
{
hexString = hexString.Replace(" ", "");
if ((hexString.Length % 2) != 0)hexString += " ";
byte[] returnBytes = new byte[hexString.Length / 2];
@fpGHwd
fpGHwd / c# 汉字转16进制字节数组
Last active November 9, 2020 12:37
c# string to hex
/// <summary>
/// 从汉字转换到16进制
/// </summary>
/// <param name="s"></param>
/// <param name="charset">编码,如"utf-8","gb2312"</param>
/// <param name="fenge">是否每字符用逗号分隔</param>
/// <returns></returns>
public static string ToHex(string s, string charset, bool fenge)
{
if ((s.Length % 2) != 0)
@fpGHwd
fpGHwd / Sublime Text 3 Build 3103 License Key - CRACK
Created August 23, 2016 01:51
Sublime Text 3 Build 3103 License Key - CRACK
I use the first
—– BEGIN LICENSE —–
Michael Barnes
Single User License
EA7E-821385
8A353C41 872A0D5C DF9B2950 AFF6F667
C458EA6D 8EA3C286 98D1D650 131A97AB
AA919AEC EF20E143 B361B1E7 4C8B7F04
@fpGHwd
fpGHwd / .bashrc
Created July 3, 2017 08:19 — forked from gsomoza/.bashrc
SSH Agent in Windows (Git Bash / MinGW)
#!bash.exe
export SSH_AUTH_SOCK=/tmp/.ssh-socket
echo ;
echo Starting connection with ssh-agent...
ssh-add -l 2>&1 >/dev/null
if [ $? = 2 ]; then
rm -f /tmp/.ssh-script /tmp/.ssh-agent-pid /tmp/.ssh-socket
# Exit status 2 means couldn't connect to ssh-agent; start one now
echo Creating new ssh-agent...
ssh-agent -a $SSH_AUTH_SOCK > /tmp/.ssh-script
#define MAXSIZE 20
#include <iostream.h>
void main()
{
int input=0; //用于输入作业号
int worknum=0; //输入的作业个数
int storesize=0; //系统分配的存储区块数
int interrupt=0; //缺页中断次数
int stack[MAXSIZE]; //栈,LRU算法的主要数据结构
@fpGHwd
fpGHwd / punctuation.cpp
Created June 6, 2018 02:11
punctuation
「直角引号」
@fpGHwd
fpGHwd / autoproxy.pac
Created June 15, 2018 09:04
pac for ubuntu
/**
* genpac 2.0.1 https://github.com/JinnLynn/genpac
* Generated: 2018-04-11 16:48:55
* GFWList Last-Modified: 2018-04-09 12:19:42
* GFWList From: online[https://raw.githubusercontent.com/gfwlist/gfwlist/master/gfwlist.txt]
*/
var proxy = 'SOCKS5 127.0.0.1:1080';
var rules = [
[
@fpGHwd
fpGHwd / git 设置和取消代理
Created June 16, 2018 04:25 — forked from laispace/git 设置和取消代理
set and cancel git proxy
git config --global https.proxy http://127.0.0.1:1080
git config --global https.proxy https://127.0.0.1:1080
git config --global --unset http.proxy
git config --global --unset https.proxy
npm config delete proxy
@fpGHwd
fpGHwd / QuicksortIteration
Last active August 29, 2019 02:00
迭代版的快速排序(递归可以用栈来代替,所以写成迭代没有问题)
//
// Created by suzumiya on 8/29/19.
//
#include <stack>
using namespace std;
int partition(int * a, int left, int right)
{