This content moved here: https://exploringjs.com/impatient-js/ch_arrays.html#quickref-arrays
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
| # git | |
| scoop install git | |
| # add the optional 'extras' bucket | |
| scoop bucket add extras | |
| # utils | |
| scoop install colortool cmder 7zip curl sudo coreutils grep cygwin totalcommander nvm paint.net | |
| # colaboration |
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
| /** | |
| * Get the caret position in all cases | |
| * | |
| * @returns {object} left, top distance in pixels | |
| */ | |
| getCaretTopPoint () { | |
| const sel = document.getSelection() | |
| const r = sel.getRangeAt(0) | |
| let rect | |
| let r2 |
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
| const echoPostRequest = { | |
| url: 'https://<my url>.auth0.com/oauth/token', | |
| method: 'POST', | |
| header: 'Content-Type:application/json', | |
| body: { | |
| mode: 'application/json', | |
| raw: JSON.stringify( | |
| { | |
| client_id:'<your client ID>', | |
| client_secret:'<your client secret>', |
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
| function logColor(color, args) { | |
| console.log(`%c ${args.join(' ')}`, `color: ${color}`); | |
| } | |
| const log = { | |
| aliceblue: (...args) => { logColor('aliceblue', args)}, | |
| antiquewhite: (...args) => { logColor('antiquewhite', args)}, | |
| aqua: (...args) => { logColor('aqua', args)}, | |
| aquamarine: (...args) => { logColor('aquamarine', args)}, | |
| azure: (...args) => { logColor('azure', args)}, |
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
| const { URL } = require('url') | |
| const https = require('https') | |
| const pingCount = 5 | |
| const paths = { | |
| npm: `https://registry.npmjs.org/vue/latest`, | |
| yarn: `https://registry.yarnpkg.com/vue/latest`, | |
| tb: `https://registry.npm.taobao.org/vue/latest` | |
| } |
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
| const express = require("express") | |
| const app = express() | |
| var passport = require("passport") | |
| var session = require("express-session") | |
| var GitHubStrategy = require("passport-github2").Strategy | |
| const GITHUB_CLIENT_ID = "your-client-id-here" // or get from process.env.GITHUB_CLIENT_ID | |
| const GITHUB_CLIENT_SECRET = "your-client-secret-here" // or get from process.env.GITHUB_CLIENT_SECRET | |
| const GITHUB_CALLBACK_URL = "http://localhost:5000/auth/github/callback" // or get from process.env.GITHUB_CALLBACK_URL |
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
| console.log(1); | |
| (_ => console.log(2))(); | |
| eval('console.log(3);'); | |
| console.log.call(null, 4); | |
| console.log.apply(null, [5]); | |
| new Function('console.log(6)')(); | |
| Reflect.apply(console.log, null, [7]) | |
| Reflect.construct(function(){console.log(8)}, []); | |
| Function.prototype.apply.call(console.log, null, [9]); | |
| Function.prototype.call.call(console.log, null, 10); |
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
| /** | |
| * PHP version 5 | |
| * @package AzulPaymentGateway | |
| * @author ideologic SRL <touch@ideologic.do> | |
| * @since File available since Release 1 | |
| */ | |
| <?php namespace App; | |
| // use Illuminate\Database\Eloquent\Model; | |
| // use DB; |