This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"title": "Disable MacOS builtin default keybinding (cmd + w)", | |
"rules": [ | |
{ | |
"description": "Disable Application Window Close", | |
"manipulators": [ | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "w", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"lastUpload":"2020-04-17T15:56:56.983Z","extensionVersion":"v3.4.3"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Solution { | |
public int ladderLength(String beginWord, String endWord, List<String> wordList) { | |
Set<String> dict = new HashSet<>(wordList), temp = new HashSet<>(); | |
Set<String> begin = new HashSet<>(), end = new HashSet<>(); | |
if (!dict.contains(endWord)) return 0; | |
int step = 1; | |
begin.add(beginWord); | |
end.add(endWord); | |
dict.remove(beginWord); | |
while(!begin.isEmpty() && !end.isEmpty()) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 假设你正在爬楼梯。需要 n 阶你才能到达楼顶。 | |
// 每次你可以爬 1 或 2 或 3 个台阶。你有多少种不同的方法可以爬到楼顶呢? | |
class Solution { | |
public int climbStairs(int n) { | |
int[] dp = new int[n + 1]; | |
dp[1] = 1; | |
dp[2] = 2; | |
dp[3] = 4; | |
if (n < 4) return dp[n]; | |
for (int i = 4; i <= n; i++) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"lastUpload":"2020-03-11T06:52:03.269Z","extensionVersion":"v3.4.3"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; -*- mode: emacs-lisp -*- | |
;; This file is loaded by Spacemacs at startup. | |
;; It must be stored in your home directory. | |
(defun dotspacemacs/layers () | |
"Configuration Layers declaration. | |
You should not put any user code in this function besides modifying the variable | |
values." | |
(setq-default | |
;; Base distribution to use. This is a layer contained in the directory | |
;; `+distribution'. For now available distributions are `spacemacs-base' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; | |
;; fork from https://github.com/usi3/emacs.ahk/blob/master/emacs.ahk | |
;; | |
;; An autohotkey script that provides emacs-like keybinding on Windows | |
;; | |
#InstallKeybdHook | |
#UseHook | |
; The following line is a contribution of NTEmacs wiki http://www49.atwiki.jp/ntemacs/pages/20.html | |
SetKeyDelay 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = { | |
apps : [ | |
{ | |
name: 'pm2cron', | |
script: 'index.js', | |
exec_mode: 'fork', | |
instance: 1, | |
cron_restart: '* * * * *' | |
}] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(setq debug-on-error t) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @link https://github.com/NodeRedis/node_redis/issues/659#issuecomment-56067673 | |
* @link https://github.com/NodeRedis/node_redis/issues/539#issuecomment-32203325 | |
*/ | |
'use strict'; | |
const crypto = require('crypto'); | |
const _ = require('lodash'); | |
const Promise = require('bluebird'); | |
const redis = require('redis'); |
NewerOlder