I hereby claim:
- I am joseluisq on github.
- I am joseluisq (https://keybase.io/joseluisq) on keybase.
- I have a public key ASCqLTIgaAbKLdRO9_EgKnYlH747jhjMPp_qFwFOcklXtgo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| /** | |
| * Return an environment variable typed value from `process.env`. | |
| * It also supports a default value in case of `undefined`. | |
| * | |
| * The function will follow these steps to take a typed value: | |
| * 1. First it will try to get the env value from `process.env`. | |
| * 2. Then if `undefined` then it try with the default environment variable value if defined. | |
| * 3. Otherwise if the default value is `undefined` then it will return the Javascript default values: | |
| * - Boolean: `false` | |
| * - String: `""` |
| # Match on all types of devices but joysticks | |
| # | |
| # If you want to configure your devices, do not copy this file. | |
| # Instead, use a config snippet that contains something like this: | |
| # | |
| # Section "InputClass" | |
| # Identifier "something or other" | |
| # MatchDriver "libinput" | |
| # | |
| # MatchIsTouchpad "on" |
| enum Token { | |
| Start, | |
| Middle, | |
| End, | |
| } | |
| /// Parses the Nginx-like `try_files` directive string and returns a vector of tokens. | |
| pub fn parse(val: &str) -> Vec<String> { | |
| let mut kind = Token::Start; | |
| let mut token = String::new(); |
| /** Representa una respuesta JSON satisfactoria */ | |
| interface ResponseOk<T = null> { | |
| success: true | |
| data: T | |
| } | |
| /** Representa una respuesta JSON errónea */ | |
| interface ResponseFail<T = null> { | |
| success: false | |
| code: string|number |
| /** Generate secure random string values in Javascript using cryto-random bytes */ | |
| function randomHash (len) { | |
| return Array.from( | |
| window.crypto.getRandomValues(new Uint8Array(Math.ceil(len / 2))), | |
| (b) => ("0" + (b & 0xFF).toString(16)).slice(-2) | |
| ).join("") | |
| } | |
| // Simple tests with various lengths |
| use futures::StreamExt; | |
| use std::error::Error; | |
| use tokio; | |
| use tokio::macros::support::Pin; | |
| use tokio::prelude::*; | |
| use tokio::time::{Duration, Instant}; | |
| pub fn main() -> Result<(), Box<dyn std::error::Error>> { | |
| let mut multi_threaded_runtime = tokio::runtime::Builder::new() | |
| .threaded_scheduler() |
| /** | |
| * DISCLAIMER: | |
| * The only intention of this "scraper script" is to serving as a backup tool for YOUR own content on Quora. | |
| * Which means YOUR PUBLIC/PRIVATE content with YOU as author. | |
| * So use this script under Quora Policy and Term conditions. https://www.quora.com/about/tos_archive | |
| **/ | |
| /** | |
| * Dead simple Javascript browser scraper to backing up YOUR Quora content. | |
| * Feel free to customize it to your needs. |