Skip to content

Instantly share code, notes, and snippets.

@ryan10328
ryan10328 / actionlist.vim
Last active December 3, 2023 13:37 — forked from zchee/actionlist.vim
IdeaVim actionlist
--- Actions ---
$Copy <M-C>
$Cut <M-X> <S-Del>
$Delete <Del> <BS> <M-BS>
$LRU
$Paste <M-V>
$Redo <M-S-Z> <A-S-BS>
$SearchWeb <A-S-G>
$SelectAll <M-A>
$Undo <M-Z>
@ryan10328
ryan10328 / git.migrate
Created February 8, 2022 15:50 — forked from niksumeiko/git.migrate
Moving git repository and all its branches, tags to a new remote repository keeping commits history
#!/bin/bash
# Sometimes you need to move your existing git repository
# to a new remote repository (/new remote origin).
# Here are a simple and quick steps that does exactly this.
#
# Let's assume we call "old repo" the repository you wish
# to move, and "new repo" the one you wish to move to.
#
### Step 1. Make sure you have a local copy of all "old repo"
### branches and tags.
@ryan10328
ryan10328 / .ideavimrc
Last active April 5, 2025 08:15
nvim setup
Plug 'vim-scripts/argtextobj.vim'
Plug 'preservim/nerdtree'
let mapleader = ' '
" This is the ideavimrc setting comes from https://github.com/saaguero/ideavimrc/blob/master/.ideavimrc
set history=1000
set showmode
set hlsearch
set scrolloff=3
@ryan10328
ryan10328 / MakePowerShellRememberSSHPassphrase.md
Created October 30, 2021 05:55 — forked from danieldogeanu/MakePowerShellRememberSSHPassphrase.md
How to make Powershell remember the SSH key passphrase.

You should not use the Open SSH client that comes with Git for Windows. Instead, Windows 10 has its own implementation of Open SSH that is integrated with the system. To achieve this:

  1. Start the ssh-agent from Windows Services:
  • Type Services in the Start Menu or Win+R and then type services.msc to launch the Services window;
  • Find the OpenSSH Authentication Agent in the list and double click on it;
  • In the OpenSSH Authentication Agent Properties window that appears, choose Automatic from the Startup type: dropdown and click Start from Service status:. Make sure it now says Service status: Running.
  1. Configure Git to use the Windows 10 implementation of OpenSSH by issuing the following command in Powershell:
git config --global core.sshCommand C:/Windows/System32/OpenSSH/ssh.exe
@ryan10328
ryan10328 / FileController.cs
Created May 22, 2019 02:39
file-download-in-ng7-webapi
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Web;
using System.Web.Http;
@ryan10328
ryan10328 / Angular 4 開發環境說明.md
Created May 28, 2017 12:22 — forked from doggy8088/Angular 18 Dev Setup.md
Angular 4 開發環境說明

Angular 4 開發環境說明

為了能讓大家能夠順利的建立起 Angular 4 開發環境,以下是需要安裝的相關軟體與安裝步驟與說明。

[ 作業系統 ]

  • Windows 7 以上版本 (更新到最新 Service Pack 版本)
  • Mac OS X 10.6 以上版本

[ 套件管理器 ( Mac OS X Only ) ]

@ryan10328
ryan10328 / HtmlHelper.cs
Created July 2, 2015 16:44
可依照Routing網址判斷是否加入active樣式的HtmlHelper
public static MvcHtmlString MenuLink(this HtmlHelper htmlHelper, string text, string action, string controller, object routevalues, object htmlAttributes)
{
var urlHelper = new UrlHelper(htmlHelper.ViewContext.RequestContext);
var routeData = htmlHelper.ViewContext.RouteData.Values;
var currentController = routeData["controller"];
var currentAction = routeData["action"];
var tagBuilder = new TagBuilder("a");
tagBuilder.MergeAttribute("href", urlHelper.Action(action, controller, routevalues));
tagBuilder.SetInnerText(text);
@ryan10328
ryan10328 / epp1.cs
Last active August 29, 2015 14:07
EPPlusExample
var ws = package.Workbook.Worksheets["XXX"];
ws.Dimension.End.Row;