Skip to content

Instantly share code, notes, and snippets.

View zergmk2's full-sized avatar

zergmk2 zergmk2

View GitHub Profile
@zergmk2
zergmk2 / git-bash-fish.md
Last active March 16, 2023 14:48 — forked from rafaelpadovezi/git-bash-fish.md
Using fish shell with git bash on windows

Using fish shell with git bash on windows

To install fish shell on windows the options are:

  • Cygwin
  • WSL
  • MSYS2

Since git bash is based on MSYS2 it seems a good fit to install fish. The problem is that git bash is a lightweight version of MSYS2 which does not include pacman as a package management, used to install fish.

This OS thread has great suggestions on how to solve this problem including using the full MSYS2. But the best solution for me was this answer by Michael Chen which installs pacman on git bash.

@zergmk2
zergmk2 / MainWindow.xaml.cs
Created December 28, 2021 01:25 — forked from huihut/MainWindow.xaml.cs
WPF Create Dump
/*
* [MiniDumpWriteDump function](https://docs.microsoft.com/zh-cn/windows/desktop/api/minidumpapiset/nf-minidumpapiset-minidumpwritedump)
* [_MINIDUMP_TYPE Enumeration](https://docs.microsoft.com/zh-cn/windows/desktop/api/minidumpapiset/ne-minidumpapiset-_minidump_type)
* [Programmatically Generating a Dump File](http://blogs.microsoft.co.il/sasha/2008/05/28/programmatically-generating-a-dump-file/)
* [Create your own crash dumps](https://blogs.msdn.microsoft.com/calvin_hsia/2015/08/31/create-your-own-crash-dumps/)
*/
using Microsoft.Win32.SafeHandles;
using System;
using System.Collections.Generic;
@zergmk2
zergmk2 / Matching Rijndael-128 in C#.NET, PHP, and Python
Created May 2, 2020 11:07 — forked from jeruyyap/Matching Rijndael-128 in C#.NET, PHP, and Python
Matching Encrypt/Decrypt Methods With Rijndael-128, CBC Mode, PKCS7 Padding in C#.NET, PHP, And Python
DO NOT use these as-is for anything important!
These are only very basic examples and they are missing much of what would be needed for a real-world use case.
These are snippets for matching encrypt and decrypt (Rijndael-128 in CBC mode with PKCS7 padding) in C#.NET, PHP, and Python.
I cobbled these together from various existing examples because at the time it seemed like a lot of existing examples out there for different languages/platforms did not quite match and would require quite a bit more work before they would encrypt/decrypt identically.
Each of these take Keys and IVs that are 16 character strings encoded in base64.
@zergmk2
zergmk2 / gist:5a218f66faf451ab667de96ff3f3dcae
Created September 23, 2019 15:43
Cmder git 中文显示乱码解决方案
Cmder 是 Windows 下替换原有 cmd 的绝佳工具,但是与默认的 cmd 一样,都与 git 命令行存在一些兼容性问题,比如中文乱码问题。在 Cmder 安装目录下的 config/user-profile.cmd 中添加如下代码,可以解决中文乱码的问题。
set LANG=zh_CN.UTF8
添加后的配置文件
添加后重新打开 Cmder 的效果
set nocompatible " be iMproved, required
filetype off " required
" set up Vundle:
" git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')
We've observed similar crashes. I suspect incompatibility of TensorFlow official release with Ubuntu 14.04, something possibly related to jemalloc. The work-around is to do following:
sudo apt-get install google-perftools
export LD_PRELOAD="/usr/lib/libtcmalloc.so.4"
heat.exe dir out\dist\HelpTool\ -gg -out setup\HelperWixProj\FilesFragment.wxs -cg HelperApp -projectname HelperAppInstaller -scom -sreg -sfrag -srd -pog Binaries -dr APPLICATIONFOLDER
@zergmk2
zergmk2 / ColorfulJIRA.js
Created October 26, 2017 01:54
Atlassian JIRA Agile Customization Tools
// ==UserScript==
// @name Atlassian JIRA Agile Customization Tools
// @namespace lu cao
// @description show different background color in backlog page of JIRA Agile.
// @include https://*.atlassian.net/secure/RapidBoard.jspa*
// @run-at document-start
// @version 1.0
// @grant none
// ==/UserScript==