Comparing libevent and libuv. My upfront biased: I want to like libevent. However, I want to objectively compare the two and make an informed decision.
- libevent 2.0.22 (Stable) [2014-01-05]
- libuv 1.8.0 (Stable) [2015-12-15]
| onMount(() => { | |
| window.dataLayer = window.dataLayer || []; | |
| window.dataLayer.push({ 'gtm.start': new Date().getTime(), event: 'gtm.js' }); | |
| const gtmScript = document.createElement('script'); | |
| gtmScript.src = 'https://www.googletagmanager.com/gtm.js?id=' + PUBLIC_TAG_ID; | |
| document.head.append(gtmScript); | |
| }); |
| sudo dd if=/dev/zero of=/swapfile0 bs=1M count=4096 status=progress # not right for btrfs? Should disable compression too? | |
| sudo chmod 600 /swapfile0 | |
| # old kernels need more swapfiles | |
| sudo lvcreate -l +100%FREE ubuntu-vg -n zram0 | |
| # edit the other two files in this gist first | |
| sudo /usr/bin/init-zram-swapping | |
| sudo sysctl -p |
| #!/bin/sh | |
| echo 'NOTE: You can now install cloudflared directly from Termux repos.' | |
| echo 'NOTE: To install it from source instead, open the script and comment out the next two lines.' | |
| pkg install cloudflared | |
| exit | |
| # ^ comment out these lines to proceed with the script | |
| echo "--upgrading packages" | |
| yes "" | pkg update |
| const React = { | |
| createElement: function (tag, attrs, children) { | |
| var element = document.createElement(tag); | |
| for (let name in attrs) { | |
| if (name && attrs.hasOwnProperty(name)) { | |
| let value = attrs[name]; | |
| if (value === true) { | |
| element.setAttribute(name, name); | |
| } else if (value !== false && value != null) { |
| /* | |
| * Copyright 2018 Google LLC. All rights reserved. | |
| * | |
| * 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 |
| 'use strict'; | |
| const crypto = require('crypto'); | |
| const ENC_KEY = "bf3c199c2470cb477d907b1e0917c17b"; // set random encryption key | |
| const IV = "5183666c72eec9e4"; // set random initialisation vector | |
| // ENC_KEY and IV can be generated as crypto.randomBytes(32).toString('hex'); | |
| const phrase = "who let the dogs out"; | |
| var encrypt = ((val) => { |
| ssh-keygen -t rsa -b 4096 -m PEM -f jwtRS256.key | |
| # Don't add passphrase | |
| openssl rsa -in jwtRS256.key -pubout -outform PEM -out jwtRS256.key.pub | |
| cat jwtRS256.key | |
| cat jwtRS256.key.pub |
| var data = "do shash'owania"; | |
| var crypto = require('crypto'); | |
| crypto.createHash('md5').update(data).digest("hex"); |