Skip to content

Instantly share code, notes, and snippets.

//bot秘钥
var apiKey = "****";
//请求链接
var apiUrl = "api.telegram.org";
//会话ID
var chatId = "***";
//发件人名称
var senderName = global('SMSRN');
if (senderName.match(/\d*/g)[0].length > 0) {
senderName = "";
@zz-chen
zz-chen / CVE-2018-0691.md
Created October 15, 2018 01:37 — forked from mala/CVE-2018-0691.md
CVE-2018-0691 プラスメッセージにおける証明書検証不備について

CVE-2018-0691 プラスメッセージにおける証明書検証不備について

  • https://jvn.jp/jp/JVN37288228/

  • 平日の業務時間内に見つけた問題である関係で(自分ルールで)所属を入れていますが、他社サービスに対する調査や報告は業務とは一切関係のない個人の活動として行っています。

  • 文責はmala個人にあります。お問い合わせなどありましたら個人宛にどうぞ。TwitterのDMや任意の文字列 @ma.la

概要

@zz-chen
zz-chen / Change Pinyin IME Layout.ps1
Created October 3, 2018 02:50
日本語キーボードなどの中国語キーボード以外のキーボードでPINYINを打つとき、Shift+2=@問題を解消。Shift+2="にする。
# Structure of the Registry
# https://docs.microsoft.com/en-us/windows/desktop/SysInfo/structure-of-the-registry
# Type Pinyin in Dvorak on Windows
# https://medium.com/@jiayu./how-to-set-your-pinyin-ime-keyboard-layout-to-dvorak-on-windows-8165ae0de6b5
Get-ItemProperty "HKLM:\SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000804"
Set-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000804' -Name 'Layout File' -Value 'KBDJPN.DLL'
Get-ItemProperty "HKLM:\SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000804"
certbot -d *.your-domain.com --manual --preferred-challenges dns certonly
#でワイルドカード電子証明書取れます!
@zz-chen
zz-chen / Dockerfile
Last active July 20, 2018 12:09
WebDAV Server (docker) and Upload command
FROM ubuntu:trusty
RUN apt-get update && apt-get install -y nginx nginx-extras apache2-utils
VOLUME /media
EXPOSE 80
COPY webdav.conf /etc/nginx/conf.d/default.conf
RUN rm /etc/nginx/sites-enabled/*
COPY entrypoint.sh /
@zz-chen
zz-chen / app.js
Created April 10, 2018 06:22
Microsoft app Demo
// Graph API endpoint to show user profile
var graphApiEndpoint = "https://graph.microsoft.com/v1.0/me";
// Graph API scope used to obtain the access token to read user profile
var graphAPIScopes = ["https://graph.microsoft.com/user.read"];
// Initialize application
var userAgentApplication = new Msal.UserAgentApplication(msalconfig.clientID, null, loginCallback, {
redirectUri: msalconfig.redirectUri
});

概要

a collection for java developer who is using eclipse

Plug-in

 

Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Microsoft\Office\15.0\Outlook\Security]
"EnableUnsafeClientMailRules"=dword:00000001
@zz-chen
zz-chen / README.md
Last active March 29, 2018 05:59
Office 2016 ProPlus Setup xml for Office 2016 Deployment Tool

64BitのOffice Professional 2016のインストール方法

背景

https://setup.office.com/ (既にプロジェクトキーを入力したこと場合は、https://setup.office.com/home/getoffice )経由でOffice Professional 2016のインストーラーの入手・製品のインストールが可能です。ただ、残念のことは、32Bitになります。ここで、64Bitのインストール方法をメモします。

前提

  • Microsoft Office Pro Plus 2016のプロジェクトキーがあること
  • 対象のコンピュータインターネットに接続していること

注意事項

@zz-chen
zz-chen / yammer bookmarklet.js
Last active May 18, 2018 05:01
yammer bookmarklet
javascript:var scriptTag=document.createElement('script');scriptTag.src='https://s0.assets-yammer.com/assets/platform_social_buttons.min.js';document.body.appendChild(scriptTag);yam.platform.yammerShareOpenPopup({defaultMessage:window.getSelection()});