Skip to content

Instantly share code, notes, and snippets.

View keoy7am's full-sized avatar
🏠
Work at home

Elliot Chen keoy7am

🏠
Work at home
  • Taipei,Taiwan
  • 15:41 (UTC +08:00)
View GitHub Profile
@keoy7am
keoy7am / nginx.conf
Created October 5, 2021 10:49 — forked from thoop/nginx.conf
Official prerender.io nginx.conf for nginx
# Change YOUR_TOKEN to your prerender token
# Change example.com (server_name) to your website url
# Change /path/to/your/root to the correct value
server {
listen 80;
server_name example.com;
root /path/to/your/root;
index index.html;
= How to install SAP ASE 16.0 SP03 for Linux
1. Download product binally
Download product binally(ASE_Suite.linuxamd64.tgz) from below url instruction:
https://help.sap.com/viewer/23c3bb4a29be443ea887fa10871a30f8/16.0.3.8/en-US/c14592e2df414678b3620e75ccbc0248.html
2. Install
```
mkdir ~/tmp
mv ASE_Suite.linuxamd64.tgz ~/tmp
@keoy7am
keoy7am / Index.cshtml
Created March 6, 2021 22:12 — forked from vanillajonathan/Index.cshtml
TinyMCE image upload on ASP.NET MVC
<script src="//tinymce.cachefly.net/4.2/tinymce.min.js"></script>
<script>
tinymce.init({
selector: 'textarea',
images_upload_url: "TinyMceUpload",
});
function upload(form) {
tinymce.activeEditor.uploadImages(function (success) {
form.submit();
@keoy7am
keoy7am / blazor-auth.md
Created February 22, 2021 03:27 — forked from SteveSandersonMS/blazor-auth.md
Blazor authentication and authorization

Authentication and Authorization

Authentication means determining who a particular user is. Authorization means applying rules about what they can do. Blazor contains features for handling both aspects of this.

It worth remembering how the overall goals differ between server-side Blazor and client-side Blazor:

  • Server-side Blazor applications run on the server. As such, correctly-implemented authorization checks are both how you determine which UI options to show (e.g., which menu entries are available to a certain user) and where you actually enforce access rules.
  • Client-side Blazor applications run on the client. As such, authorization is only used as a way of determining what UI options to show (e.g., which menu entries). The actual enforcement of authorization rules must be implemented on whatever backend server your application operates on, since any client-side checks can be modified or bypassed.

Authentication-enabled templates for Server-Side Blazor

@keoy7am
keoy7am / image_phpstorm_server.png
Created May 8, 2020 20:40 — forked from esilvajr/image_phpstorm_server.png
How to use XDebug inside a docker container.
image_phpstorm_server.png
@keoy7am
keoy7am / bash.py
Created March 30, 2020 21:55 — forked from kirpit/bash.py
Enables to run subprocess commands in a different thread with TIMEOUT option!
#! /usr/bin/env python
import threading
import subprocess
import traceback
import shlex
class Command(object):
"""
Enables to run subprocess commands in a different thread with TIMEOUT option.
@keoy7am
keoy7am / tmux-cheatsheet.markdown
Created March 8, 2020 18:42 — forked from ryerh/tmux-cheatsheet.markdown
Tmux 快捷键 & 速查表 & 简明教程

注意:本文内容适用于 Tmux 2.3 及以上的版本,但是绝大部分的特性低版本也都适用,鼠标支持、VI 模式、插件管理在低版本可能会与本文不兼容。

Tmux 快捷键 & 速查表 & 简明教程

启动新会话:

tmux [new -s 会话名 -n 窗口名]

恢复会话:

@keoy7am
keoy7am / SelfInstaller.cs
Created November 28, 2019 20:19 — forked from walterlv/SelfInstaller.cs
这是一个简单的自更新程序的类。使用此类型,程序初次运行的时候会安装自己,如果已安装旧版本会更新自己,如果已安装最新则直接运行。
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Security.Principal;
namespace Walterlv.Installing
{