The following code will produce code-splitting in Webpack, which means that the source code will be split into several files that will be loaded async at runtime.. More info here;
import('./some-module').then((SomeModule) => {});
//https://developer.mozilla.org/en/docs/Web/API/GlobalEventHandlers/onerror | |
//https://blog.sentry.io/2016/01/04/client-javascript-reporting-window-onerror.html | |
//https://danlimerick.wordpress.com/2014/01/18/how-to-catch-javascript-errors-with-window-onerror-even-on-chrome-and-firefox/ | |
window.onerror = function (messageOrEvent, source, lineno, colno, error) { | |
try { | |
console.log({ | |
//error message(string).Available as event (sic!) in HTML onerror = "" handler. | |
messageOrEvent: messageOrEvent, | |
//URL of the script where the error was raised(string) |
using System; | |
using System.IO; | |
using System.Text; | |
using System.Threading.Tasks; | |
using Microsoft.AspNetCore.Http; | |
using Microsoft.AspNetCore.Http.Internal; | |
using Microsoft.IO; | |
// https://exceptionnotfound.net/using-middleware-to-log-requests-and-responses-in-asp-net-core/ | |
// https://gist.github.com/elanderson/c50b2107de8ee2ed856353dfed9168a2 |
using Microsoft.AspNetCore.Builder; | |
using Microsoft.AspNetCore.Http; | |
using Microsoft.AspNetCore.Mvc.Infrastructure; | |
using Microsoft.AspNetCore.Mvc.Internal; | |
using Microsoft.AspNetCore.Routing; | |
using Microsoft.Extensions.DependencyInjection; | |
using Newtonsoft.Json; | |
using System; | |
using System.Linq; | |
using System.Threading.Tasks; |
using System; | |
using System.Collections.Generic; | |
using System.ComponentModel.DataAnnotations; | |
using System.IO; | |
using System.Linq; | |
using System.Runtime.Serialization; | |
/// <summary> | |
/// https://github.com/samuelneff/MimeTypeMap/blob/master/src/MimeTypes/MimeTypeMap.cs | |
/// https://www.garykessler.net/library/file_sigs.html |
namespace Promise.CommandLine | |
{ | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Threading.Tasks; | |
class Program | |
{ | |
static void Main(string[] args) |
# 1. Change owner of /var/www/html directory to apache user, here: www-data. | |
sudo chown -R www-data:www-data /var/www/html | |
# 2. Allow Group to edit. | |
sudo chmod -R 775 /var/www/html | |
# 3. Add yourself to apache group(www-data). | |
sudo usermod -a -G www-data ${USER} | |
# 4. Reboot to effect the permissions. |
The following code will produce code-splitting in Webpack, which means that the source code will be split into several files that will be loaded async at runtime.. More info here;
import('./some-module').then((SomeModule) => {});
#!/bin/bash | |
EMAIL=me@gmail.com | |
KEY=11111111111111111111111111 | |
ZONE_ID=2222222222222222222222222 | |
curl -X GET https://api.cloudflare.com/client/v4/zones/${ZONE_ID}/dns_records?per_page=500 \ | |
-H "X-Auth-Email: ${EMAIL}" \ | |
-H "X-Auth-Key: ${KEY}" \ | |
-H "Content-Type: application/json" | jq .result[].id | tr -d '"' | ( |
#!/bin/bash | |
devices=(`adb devices | grep -v devices | grep device | cut -f 1`) | |
devicesCount=${#devices[@]} | |
devicesToUse=() | |
if [ $devicesCount -eq 0 ] | |
then | |
echo "No attached devices."; | |
elif [ $devicesCount -eq 1 ] |
#!/bin/bash | |
# Script adb+ | |
# Usage | |
# You can run any command adb provides on all your currently connected devices | |
# ./adb+ <command> is the equivalent of ./adb -s <serial number> <command> | |
# | |
# Examples | |
# ./adb+ version | |
# ./adb+ install apidemo.apk | |
# ./adb+ uninstall com.example.android.apis |