Skip to content

Instantly share code, notes, and snippets.

@xiaoshude
xiaoshude / private.xml
Created June 27, 2016 01:54 — forked from mhaylock/private.xml
Karabiner (https://pqrs.org/osx/karabiner/index.html.en) Configuration for remapping "Sculpt Ergonomic Desktop" mouse's Windows button to Mouse Button 4. Derived from http://blog.yorkxin.org/posts/2014/04/12/microsoft-sculpt-mobile-mouse-and-mac/.
<?xml version="1.0"?>
<root>
<devicevendordef>
<vendorname>MICROSOFT</vendorname>
<vendorid>0x045e</vendorid>
</devicevendordef>
<deviceproductdef>
<productname>SCULPT_ERGONOMIC_DESKTOP</productname>
<productid>0x07a5</productid>
// Node.js CheatSheet.
// Download the Node.js source code or a pre-built installer for your platform, and start developing today.
// Download: http://nodejs.org/download/
// More: http://nodejs.org/api/all.html
// 0. Synopsis.
// http://nodejs.org/api/synopsis.html
@xiaoshude
xiaoshude / wechat-browser-detect.js
Created November 20, 2017 02:41 — forked from loo2k/wechat-browser-detect.js
JavaScript 判断是否微信内置浏览器
var isWeixin = false;
if (typeof WeixinJSBridge == "object" && typeof WeixinJSBridge.invoke == "function") {
isWeixin = true;
} else {
if (document.addEventListener) {
document.addEventListener("WeixinJSBridgeReady", function() { isWeixin = true; }, false);
} else if (document.attachEvent) {
document.attachEvent("WeixinJSBridgeReady", function() { isWeixin = true; });
document.attachEvent("onWeixinJSBridgeReady", function() { isWeixin = true; });
@xiaoshude
xiaoshude / gist:47654da01592bbbd69d0d250dd43f0ad
Created January 10, 2022 06:32 — forked from kitek/gist:1579117
NodeJS create md5 hash from string
var data = "do shash'owania";
var crypto = require('crypto');
crypto.createHash('md5').update(data).digest("hex");
@xiaoshude
xiaoshude / app.module.ts
Created August 3, 2022 04:18 — forked from paztek/app.module.ts
nestjs-http-service-example-1
import { Module } from '@nestjs/common';
import { HttpModule } from './http/http.module';
import { FooModule } from './foo/foo.module';
@Module({
imports: [
HttpModule,
FooModule, // <- we'll make use of the "augmented" HttpService in this module
],
@xiaoshude
xiaoshude / google-apps-script.md
Created September 9, 2022 07:24 — forked from labnol/google-apps-script.md
How to Learn Google Apps Script

Learning Google Apps Script

Find the best resources for learning Google Apps Script, the glue that connects all GSuite services including Gmail, Google Drive, Calendar, Google Sheets, Forms, Maps, Analytics and more.

A good place to learn more about Google Apps Script is the official documentation available at developers.google.com. Here are other Apps Script resources that will help you get up to speed.

  1. Google Apps Script Code Samples by Amit Agarwal
  2. Google Apps Script Development - Create Google Apps Script projects locally inside VS Code - video tutorial
  3. Awesome Google Scripts by Amit Agarwal
  4. Google Developer Experts - Follow Apps Scr