Most basic example of authenticating with Github in node.
Clone this gist, change keys inside config.js and then hit npm install && node app.js.
| // minimal d3d11 reference implementation; an uncluttered direct3d 11 setup and rendering primer for newcomers to the api. | |
| // complete, runnable c+ application contained in a single function (winmain) and laid out in a step-by-step fashion that | |
| // should be easy to follow from the code alone. win7 compatible. produces this output: https://youtu.be/XR7zPheek2Q | |
| #pragma comment(lib, "d3d11") | |
| #pragma comment(lib, "d3dcompiler") | |
| #include <windows.h> | |
| #include <d3d11_1.h> |
| { | |
| "ease": [0.25, 0.1, 0.25, 1.0], | |
| "linear": [0.00, 0.0, 1.00, 1.0], | |
| "ease-in": [0.42, 0.0, 1.00, 1.0], | |
| "ease-out": [0.00, 0.0, 0.58, 1.0], | |
| "ease-in-out": [0.42, 0.0, 0.58, 1.0] | |
| } |
| function $(container, selector) { | |
| const els = | |
| typeof selector === 'string' | |
| ? container.querySelectorAll(selector) | |
| : typeof container === 'string' ? document.querySelectorAll(container) : [container]; | |
| const fns = { | |
| removeClass(...cls) { | |
| els.forEach(el => { | |
| el.classList.remove(...cls); |
| @echo off | |
| setlocal enabledelayedexpansion | |
| if {%1}=={} ( | |
| echo Usage: %~nx0 [vhd] [letter] | |
| exit /b 1 | |
| ) | |
| set vhdPath=%~dpnx1 | |
| set driveLetter=%2 |
| [Dialer Defaults] | |
| ;Init1 = ATZ | |
| ;Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 | |
| ;Modem Type = Analog Modem | |
| ;Baud = 9600 | |
| New PPPD = yes | |
| ;Modem = /dev/ttyUSB0 | |
| ;ISDN = 0 | |
| ; Phone = <Target Phone Number> | |
| ; Password = <Your Password> |
"How do I get started with Node?" is a commonly heard question in #Node.js. This gist is an attempt to compile some of the answers to that question. It's a perpetual work-in-progress.
And if this list didn't quite answer your questions, I'm available for tutoring and code review! A donation is also welcome :)
Before you get started learning about JavaScript and Node.js, there's one very important article you need to read: Teach Yourself Programming in Ten Years.
Understand that it's going to take time to learn Node.js, just like it would take time to learn any other specialized topic - and that you're not going to learn effectively just by reading things, or following tutorials or courses. _Get out there and build things!
| // ==UserScript== | |
| // @name LE | |
| // @namespace http://your.homepage/ | |
| // @version 0.1 | |
| // @description LE | |
| // @author You | |
| // @match http://tampermonkey.net/empty.html | |
| // @grant unsafeWindow | |
| // ==/UserScript== |
git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.
elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParentelem.clientLeft, elem.clientTop, elem.clientWidth, elem.clientHeightelem.getClientRects(), elem.getBoundingClientRect()