(C-x means ctrl+x, M-x means alt+x)
The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:
| // | |
| // Smooth scroll-to inspired by: | |
| // http://stackoverflow.com/a/24559613/728480 | |
| // | |
| module.exports = function (scrollTo, scrollDuration) { | |
| // | |
| // Set a default for where we're scrolling to | |
| // |
| // Pase these lines into website's console ( Ctrl/Cmd + Shift + I ) | |
| if(!!window.React || | |
| !!document.querySelector('[data-reactroot], [data-reactid]')) | |
| console.log('React.js'); | |
| if(!!window.angular || | |
| !!document.querySelector('.ng-binding, [ng-app], [data-ng-app], [ng-controller], [data-ng-controller], [ng-repeat], [data-ng-repeat]') || | |
| !!document.querySelector('script[src*="angular.js"], script[src*="angular.min.js"]')) | |
| console.log('Angular.js'); |
| /** | |
| * Copyright (c) 2015-present, Facebook, Inc. | |
| * All rights reserved. | |
| * | |
| * This source code is licensed under the BSD-style license found in the | |
| * LICENSE file in the root directory of this source tree. An additional grant | |
| * of patent rights can be found in the PATENTS file in the same directory. | |
| */ | |
| #import "RCTScrollView.h" |
| function asyncEvent(){ | |
| var dfd = jQuery.Deferred(); | |
| setTimeout(function () { | |
| dfd.resolve(); | |
| }, 500); | |
| return dfd.promise(); | |
| } | |
| function resovleCallback(){ | |
| console.log('resolved'); |
| #!/usr/local/bin/python | |
| import os, re, sqlite3 | |
| from bs4 import BeautifulSoup, NavigableString, Tag | |
| db = sqlite3.connect('loopback.docset/Contents/Resources/docSet.dsidx') | |
| cur = db.cursor() | |
| try: cur.execute('DROP TABLE searchIndex;') | |
| except: pass |
| #!/usr/bin/python | |
| ''' | |
| this script is used watch the folder. after file changes, auto add and commit the git | |
| run python git-auto-add.py [commit comments] | |
| ''' | |
| import time | |
| import sys | |
| import os | |
| from watchdog.observers import Observer | |
| from watchdog.events import PatternMatchingEventHandler |
| // 还需要了解的: | |
| // - 什么是 UID | |
| // - 这四种方式优劣 | |
| function getId() { | |
| return "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx".replace(/x/g, function() { | |
| return Math.floor(Math.random()*16).toString(16).toUpperCase(); | |
| }); | |
| } |