I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!
\
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
| /* | |
| * Copyright 2014 Chris Banes | |
| * | |
| * Licensed under the Apache License, Version 2.0 (the "License"); | |
| * you may not use this file except in compliance with the License. | |
| * You may obtain a copy of the License at | |
| * | |
| * http://www.apache.org/licenses/LICENSE-2.0 | |
| * | |
| * Unless required by applicable law or agreed to in writing, software |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
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
| var express = require('express'), | |
| request = require('request'); | |
| var app = express(); | |
| // Forward all requests from /api to http://foo.com/api | |
| app.use('/api', function(req, res) { | |
| req.pipe(request("http://foo.com/api" + req.url)).pipe(res); | |
| }); |
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
| // getComponent is a function that returns a promise for a component | |
| // It will not be called until the first mount | |
| function asyncComponent(getComponent) { | |
| return class AsyncComponent extends React.Component { | |
| static Component = null; | |
| state = { Component: AsyncComponent.Component }; | |
| componentWillMount() { | |
| if (!this.state.Component) { | |
| getComponent().then(Component => { |
A collection of information about accessing raw MultiTouch events on MacOS.
Compiled while building mtif (a MultiTouch interface for common lisp).
First of all, please note that token expiration and revoking are two different things.
- Expiration only happens for web apps, not for native mobile apps, because native apps never expire.
- Revoking only happens when (1) uses click the logout button on the website or native Apps;(2) users reset their passwords; (3) users revoke their tokens explicitly in the administration panel.
A JWT token that never expires is dangerous if the token is stolen then someone can always access the user's data.
Quoted from JWT RFC:
D3D11 essentials:
- create window, device, device context and swap chain (easy mode): https://github.com/floooh/sokol-samples/blob/master/d3d11/d3d11entry.c
- create vertex+index buffers: https://github.com/floooh/sokol/blob/b9490494987a9738a4dda484e8dda5df0dab217c/sokol_gfx.h#L6702
- create textures/render targets/samplers: https://github.com/floooh/sokol/blob/b9490494987a9738a4dda484e8dda5df0dab217c/sokol_gfx.h#L6775
- create shaders: https://github.com/floooh/sokol/blob/b9490494987a9738a4dda484e8dda5df0dab217c/sokol_gfx.h#L7078
- create "pipeline state" (all the render state, vertex layout (aka input layout): https://github.com/floooh/sokol/blob/b9490494987a9738a4dda484e8dda5df0dab217c/sokol_gfx.h#L7192
- create "render target views": https://github.com/floooh/sokol/blob/b9490494987a9738a4dda484e8dda5df0dab217c/sokol_gfx.h#L7330
- start rendering (clearing etc): https://github.com/floooh/sokol/blob/b9490494987a9738a4dda484e8dda5df0dab217c/sokol_gfx.h#L7438
- MSAA resolve (when rendering to offscreen rende
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 std = @import("std"); | |
| const net = std.net; | |
| const fs = std.fs; | |
| const os = std.os; | |
| pub const io_mode = .evented; | |
| pub fn main() anyerror!void { | |
| var general_purpose_allocator = std.heap.GeneralPurposeAllocator(.{}){}; | |
| const allocator = &general_purpose_allocator.allocator; |
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
| <div id="map"></div> |
OlderNewer