The core algorithm/TOTP implementation used by GAuth
Ref: http://blog.tinisles.com/2011/10/google-authenticator-one-time-password-algorithm-in-javascript/
The core algorithm/TOTP implementation used by GAuth
Ref: http://blog.tinisles.com/2011/10/google-authenticator-one-time-password-algorithm-in-javascript/
| <%@ WebHandler Language="C#" Class="PassThruProxy" Debug="true" %> | |
| using System; | |
| using System.Diagnostics; | |
| using System.IO; | |
| using System.Text; | |
| using System.Web; | |
| /** | |
| * <summary><c>PassThruProxy</c> is a simple pass-through proxy interface for C#.NET (IIS Servers).</summary> |
(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 works on all devices/browsers, and uses IndexedDBShim as a final fallback | |
| var indexedDB = window.indexedDB || window.mozIndexedDB || window.webkitIndexedDB || window.msIndexedDB || window.shimIndexedDB; | |
| // Open (or create) the database | |
| var open = indexedDB.open("MyDatabase", 1); | |
| // Create the schema | |
| open.onupgradeneeded = function() { | |
| var db = open.result; | |
| var store = db.createObjectStore("MyObjectStore", {keyPath: "id"}); |
| Mounting block device in lxc (specifically Proxmox 4) | |
| 1. Find devices' major & minor ID (need both dev + partition for HDD) | |
| # ls -al /dev/sda | |
| brw-rw---- 1 root disk 8, 0 Dec 19 11:16 /dev/sda1 | |
| # ls -al /dev/sda1 | |
| brw-rw---- 1 root disk 8, 1 Dec 19 11:16 /dev/sda1 | |
| That's 8,0 for sda and 8,1 for sda1 |
| // for multiple requests | |
| let isRefreshing = false; | |
| let failedQueue = []; | |
| const processQueue = (error, token = null) => { | |
| failedQueue.forEach(prom => { | |
| if (error) { | |
| prom.reject(error); | |
| } else { | |
| prom.resolve(token); |
This assessment is performed with respect to the requirements of the .NET community open source projects which I maintain. It is restricted to the free tier provided by each system.
Only the drawbacks are listed, which makes the assessment sound a bit negative, but it's relative to a baseline functional expectation:
| namespace HttpClient.FSharp | |
| open System | |
| open System.Net.Http | |
| type HttpMethod = | |
| | Post | |
| | Put | |
| | Delete | |
| | Get |
| // NOTE: import this Nuget package: TaskBuilder.fs (written using 2.1.0) | |
| // | |
| // Tested in LINQPad (hence Dump method usage). | |
| open System | |
| open System.Collections | |
| open System.Collections.Generic | |
| open System.Diagnostics | |
| open System.Linq | |
| open System.Threading |