| Function | Shortcut | 
|---|---|
| New Tab | ⌘ + T | 
| Close Tab or Window | ⌘ + W  (same as many mac apps) | 
| Go to Tab | ⌘ + Number Key  (ie: ⌘2 is 2nd tab) | 
| Go to Split Pane by Direction | ⌘ + Option + Arrow Key | 
| Cycle iTerm Windows | ⌘ + backtick (true of all mac apps and works with desktops/mission control) | 
  
    
      This file contains hidden or 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
    
  
  
    
  | Android Emulator usage: emulator [options] [-qemu args] | |
| options: | |
| -sysdir <dir> search for system disk images in <dir> | |
| -system <file> read initial system image from <file> | |
| -datadir <dir> write user data into <dir> | |
| -kernel <file> use specific emulated kernel | |
| -ramdisk <file> ramdisk image (default <system>/ramdisk.img | |
| -image <file> obsolete, use -system <file> instead | |
| -initdata <file> same as '-init-data <file>' | |
| -data <file> data image (default <datadir>/userdata-qemu.img | 
  
    
      This file contains hidden or 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
    
  
  
    
  | import React, { useState, useEffect } from 'react'; | |
| import PropTypes from 'prop-types'; | |
| import { Image, StyleSheet, Dimensions } from 'react-native'; | |
| import FastImage from 'react-native-fast-image'; | |
| import ImageZoom from 'react-native-image-pan-zoom'; | |
| // ZoomableImage component renders a zoomable FastImage the size of the screen dimensions. | |
| const dims = Dimensions.get('window'); | 
  
    
      This file contains hidden or 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
    
  
  
    
  | // 🔥 Node 7.6 has async/await! Here is a quick run down on how async/await works | |
| const axios = require('axios'); // promised based requests - like fetch() | |
| function getCoffee() { | |
| return new Promise(resolve => { | |
| setTimeout(() => resolve('☕'), 2000); // it takes 2 seconds to make coffee | |
| }); | |
| } | 
Instructions for getting an ELK stack set up quick on Mac. Paths are opinionated. You'll have to infer and change. Sorry mate. 🍰
Install Homebrew if not already. You probably have. If not, you should.
brew install elasticsearch nginx
  
    
      This file contains hidden or 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
    
  
  
    
  | data:text/html, <style type="text/css">.e{position:absolute;top:0;right:0;bottom:0;left:0;}</style><div class="e" id="editor"></div><script src="http://d1n0x3qji82z53.cloudfront.net/src-min-noconflict/ace.js" type="text/javascript" charset="utf-8"></script><script>var e=ace.edit("editor");e.setTheme("ace/theme/monokai");e.getSession().setMode("ace/mode/ruby");</script> | |
| <!-- | |
| For other language: Instead of `ace/mode/ruby`, Use | |
| Markdown -> `ace/mode/markdown` | |
| Python -> `ace/mode/python` | |
| C/C++ -> `ace/mode/c_cpp` | |
| Javscript -> `ace/mode/javascript` | |
| Java -> `ace/mode/java` | |
| Scala- -> `ace/mode/scala` | 
  
    
      This file contains hidden or 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
    
  
  
    
  | jQuery.fn.brightness = function() { | |
| var bg_color, rgba, y; | |
| bg_color = this.css('background-color'); | |
| if ((bg_color != null) && bg_color.length) { | |
| rgba = bg_color.match(/^rgb(?:a)?\(([0-9]{1,3}),\s([0-9]{1,3}),\s([0-9]{1,3})(?:,\s)?([0-9]{1,3})?\)$/); | |
| if (rgba != null) { | |
| if (rgba[4] === '0') { | |
| if (this.parent().length) return this.parent().brightness(); | |
| } else { | |
| y = 2.99 * rgba[1] + 5.87 * rgba[2] + 1.14 * rgba[3]; |