Skip to content

Instantly share code, notes, and snippets.

View anxgang's full-sized avatar
🍺
Drunk

anxgang anxgang

🍺
Drunk
  • Taiwan, Kaohsiung
View GitHub Profile

SSL 驗證方式:

# 簡單查詢
echo | openssl s_client -connect xxx.xxx.xxx:443 | openssl x509 -noout -dates
# 簡單查詢 指定 tls1.2
echo | openssl s_client -connect xxx.xxx.xxx:443 -tls1_2 | openssl x509 -noout -dates
# 簡單查詢 指定 tls1.2 指定 domain
echo | openssl s_client -connect xxx.xxx.xxx:443 -tls1_2 -servername xxx.xxx.xxx | openssl x509 -noout -dates
@anxgang
anxgang / alternate-ngrok.md
Last active June 8, 2024 08:01
替代 ngrok 方式

替代 ngrok 方式

1. nginx 建立

server {
  server_name xxx.yourdomain.com;
  location / {
 proxy_pass http://localhost:3333/;
@anxgang
anxgang / mac_install_php_pgsql_extension.md
Last active March 6, 2020 02:29
mac 安裝 php 的 pgsql extension

mac 安裝 php 的 pgsql extension

因為我的 php 是用 homebrew 安裝的 找不到比較快的方式 只好自己去從源碼編譯

  1. 先確認 php 版本
$ php -v
@anxgang
anxgang / 1_frontend_setup_on_win.md
Last active May 16, 2021 04:21
前端環境安裝Win
@anxgang
anxgang / octopress.js
Created October 14, 2019 09:26
cdn-theme.logdown.io
function getNav() {
var mainNav = $('ul.main-navigation, ul[role=main-navigation]').before('<fieldset class="mobile-nav">')
var mobileNav = $('fieldset.mobile-nav').append('<select>');
mobileNav.find('select').append('<option value="">Navigate&hellip;</option>');
var addOption = function(i, option) {
mobileNav.find('select').append('<option value="' + this.href + '">&raquo; ' + $(this).text() + '</option>');
}
mainNav.find('a').each(addOption);
$('ul.subscription a').each(addOption);
mobileNav.find('select').bind('change', function(event) {
@anxgang
anxgang / KMS Server
Last active April 17, 2023 05:26
建 KMS Server 及 啟用方式
[Server端] 使用 Docker 建立 kms 驗證服務
$ docker run -itd -p 1688:1688 --name kms luodaoyi/kms-server
# 開機啟動 可補上
$ docker update --restart unless-stopped kms
[Client端] 建立 bat 執行檔驗證
xxx.bat
------------------------------
@anxgang
anxgang / application.js
Created January 3, 2019 07:54
Autoload Vue Components
// ::Autoload Components::
const req = require.context('../components/', true, /\.(js|vue)$/i);
req.keys().map(key => {
const name = key.match(/\w+/)[0];
return Vue.component(name, req(key).default);
});
alias code="/mnt/c/Windows/System32/cmd.exe /C code"
@anxgang
anxgang / powerlevel9k.zsh-theme
Created November 29, 2018 15:51
~/.oh-my-zsh/custom/themes/powerlevel9k/powerlevel9k.zsh-theme
# vim:ft=zsh ts=2 sw=2 sts=2 et fenc=utf-8
################################################################
# powerlevel9k Theme
# https://github.com/bhilburn/powerlevel9k
#
# This theme was inspired by agnoster's Theme:
# https://gist.github.com/3712874
################################################################
################################################################
@anxgang
anxgang / erb.json
Created November 29, 2018 13:49
vscode user setting
{
"<% %>":{
"prefix": "p-",
"body": "<% $1 %>"
},
"<%= %>": {
"prefix": "p=",
"body": "<%= $1 %>"
},
"<!--<% if false %> ... <% end%>-->": {