All of the following information is based on go version go1.17.1 darwin/amd64
.
GOOS | Out of the Box |
---|---|
aix |
✅ |
android |
✅ |
#!/bin/bash | |
go test -coverprofile=coverage.out | |
go tool cover -html=coverage.out |
[{ | |
"Note": "The first two digits (ranging from 10–43) correspond to the province, while the last two digits correspond either to the city/delivery zone (range 01–50) or to the district/delivery zone (range 51–99). Afghanistan Postal code lookup", | |
"Country": "Afghanistan", | |
"ISO": "AF", | |
"Format": "NNNN", | |
"Regex": "^\\d{4}$" | |
}, { | |
"Note": "With Finland, first two numbers are 22.", | |
"Country": "Åland Islands", | |
"ISO": "AX", |
:global wanInterface "wan1" | |
:global wanIP "$wanIP" | |
# Get the current IP on the interface | |
:local currentIPtemp [/ip address get [find interface="$wanInterface" disabled=no] address]; | |
# IP without netmask | |
:local currentIP [:pick $currentIPtemp 0 ([:len $currentIPtemp]-3)]; | |
:if ($currentIP != $wanIP) do={ |
> Thank you for reaching out to Autonomous! I am sorry to hear that you are having some trouble with your SmartDesk | |
> but I will be glad to assist. It sounds like your system needs a "hard reset" can I please have you follow these | |
> steps thoroughly. | |
Reset Steps: | |
1. Unplug the desk for 20 seconds. Plug it back in. Wait a full 20 seconds. | |
2. Press the up and down buttons until the desk lowers all the way and beeps or 20 seconds pass. | |
3. Release both buttons. | |
4. Press the down buttons until the desk beeps one more time or 20 seconds pass. |
Because Travis CI can automatically execute scripts after successfully (or unsuccessfully!) executing tests, it is an obvious choice for a deployment tool. In order to deploy to a Git repository on a remote server, the process generally is as follows:
Rule | Namespace | Description |
---|---|---|
Arrays.ArrayBracketSpacing | /Squiz.Arrays.ArrayBracketSpacing | Ensure that there are no spaces around square brackets. |
Arrays.ArrayDeclaration | /Squiz.Arrays.ArrayDeclaration | Ensures that arrays conform to the array coding standard. |
Arrays.DisallowLongArraySyntax | /Generic.Arrays.DisallowLongArraySyntax | Bans the use of the PHP long array syntax. |
Arrays.DisallowShortArraySyntax | /Generic.Arrays.DisallowShortArraySyntax | Bans the use of the PHP short array syntax. |
CSS.BrowserSpecificStyles | /MySource.CSS.BrowserSpecificStyles | Ensure that browser-specific styles are not used. |
CSS.ClassDefinitionClosingBraceSpace | /Squiz.CSS.ClassDefinitionClosingBraceSpace | Ensure there is a single blank line after the closing brace of a class definition. |
CSS.ClassDefinitionNameSpacing | /Squiz.CSS.ClassDefinitionNameSpacing | Ensure there are no blank lines between the names of classes/IDs. |
CSS.ClassDefinitionOpeningBrace |
Lately, I've been building a Python platform that relies heavily on interactions with Github. Instead of re-inventing the wheel, I decided to go with PyGithub as a wrapper around Github v3 API.
This library implements the full API, which allows me to be very productive when I need to add a workflow in my platform that involves Github. However, it quickly became a real PITA to write unit tests. Even if the package comes with its own testing Framework, it is not documented yet and I didn't manage to crack it up in a decent amount of time.
I decided to hack the testing a little bit, using another very cool package, httpretty. Httpretty allows you to monkey patch the socket module during testing, so you can respond anything you want to any kind of network requests. Here's what I came up with, do not hesitate to give any feedback.
The package that linked you here is now pure ESM. It cannot be require()
'd from CommonJS.
This means you have the following choices:
import foo from 'foo'
instead of const foo = require('foo')
to import the package. You also need to put "type": "module"
in your package.json and more. Follow the below guide.await import(…)
from CommonJS instead of require(…)
.