Cmd+Shift+K (on OS X) or Ctrl+Shift+’ (Windows and Linux) selects both tags for editing.
Ctrl + Shift + w
Wrap selection in
| // hooks/use-scroll.js | |
| import { useEffect, useRef, useCallback, useState } from 'react' | |
| function useScroll({ threshold = 450, isWindow = false, smooth = true } = {}) { | |
| const [isAtBottom, setIsAtBottom] = useState(false) | |
| const ref = useRef(isWindow ? window : null) | |
| const goTop = useCallback(() => { | |
| const element = ref.current | |
| element.scrollTo({ |
| -- phpMyAdmin SQL Dump | |
| -- version 3.5.2.2 | |
| -- http://www.phpmyadmin.net | |
| -- | |
| -- Host: 127.0.0.1 | |
| -- Generation Time: Apr 08, 2013 at 02:48 PM | |
| -- Server version: 5.5.27 | |
| -- PHP Version: 5.4.7 | |
| SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; |
| #!/bin/sh | |
| let sleepTime="15*60"; | |
| while [ 1 ] | |
| do | |
| if [ $(( $RANDOM % 2)) == 0 ] | |
| then | |
| echo "switching to NTWRK1"; | |
| networksetup -setairportnetwork en1 {NTWRK_NAME} {NTWRK_PSWD} | |
| else |
| class Coupon { | |
| constructor(options) { | |
| this.title = options.title; | |
| this.desc = options.desc; | |
| this.code = options.code; | |
| this.link = options.link; | |
| this.expiry = options.expiry; | |
| } | |
| } |
| General Questions | |
| ========================================================================================= | |
| Personal Workflow | |
| 1. What is a recent challenges you experienced and how did you solved those? | |
| 2. What tools you use in regular workflow? | |
| 3. If you jumped on a project and they used tabs and you used spaces, what would you do? | |
| _________________________________________________________________________________________ | |
| Performance |
| if (typeof Object.create != 'function') { | |
| Object.create = (function() { | |
| var Temp = function() {}; | |
| return function (prototype) { | |
| if (arguments.length > 1) { | |
| throw Error('2nd argument is not supported'); | |
| } | |
| if (typeof prototype != 'object') { | |
| throw TypeError('argument should be object'); |
| array1 = [0,1,2,3,4,5,6] | |
| [0, 1, 2, 3, 4, 5, 6] | |
| array1.splice(2) -> default first argument is 0 | |
| [2, 3, 4, 5, 6] | |
| array1 | |
| [0, 1] | |
| ---------------------------------------------------------------------------------------- |
| // Get a random number in a specific range | |
| function randomInRange(max, min) { | |
| return Math.floor(Math.random() * (max - min + 1)) + min; | |
| } | |
| // Get a random item from an array | |
| function randomFromArray(items) { | |
| return items[Math.floor(Math.random() * items.length)]; | |
| } |
| .gbqfif, .gbqfsf,li.g, body, html, .std, h1 { | |
| font-family: "Open Sans"; | |
| } | |
| .sbib_b { | |
| padding: 3px 7px 0; | |
| } | |
| #rhs ._za.vk_pl { | |
| padding-left: 0; |