This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- default-setting 2025-03-09 13:46:03.767333947 +0000 | |
+++ set-face-attribute 2025-03-09 15:23:20.954345045 +0000 | |
@@ -13,9 +13,9 @@ | |
Foundry: unspecified | |
Width: unspecified | |
Height: unspecified | |
- Weight: unspecified | |
+ Weight: bold | |
Slant: unspecified | |
- Foreground: medium blue |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use 5.020; | |
use XML::LibXML (); | |
XML::LibXML->load_xml( string => <<'EOF' ); | |
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE foo [<!ENTITY xxe SYSTEM "http://webhook.site/<unique-token>">]> | |
<foo>&xxe;</foo> | |
EOF |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use Test2::V0; | |
use Object::Pad 0.808; | |
class Power { | |
field $_power :inheritable = 0; | |
method of ($number) { $number ** $_power }; | |
}; | |
class Square { | |
inherit Power '$_power'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -euxo pipefail | |
# | |
# Install the dev utilities I need | |
# emacs (blead) | |
if ! [ -x "$(command -v emacs)" ]; then | |
# I needed these dependencies (you might not) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use Test2::V0; | |
subtest 'Using stubs in Test2' => sub { | |
my $user = mock { company => 'dev' }; | |
my $userdata = mock { day => '2022-02-02' }; | |
my $stats = mock { user => $user, userdata => $userdata }; | |
is( $stats->user->company, 'dev', | |
'should return the right value for $stats->user->company', | |
); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -euxo pipefail | |
git init | |
npm init -y | |
npm install -D depcheck eslint eslint-config-prettier eslint-plugin-jsdoc eslint-plugin-json eslint-plugin-prettier husky lint-staged prettier | |
npm pkg set scripts.depcheck='depcheck' | |
npm pkg set scripts.lint-staged='lint-staged --allow-empty' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$schema": "https://json-schema.org/draft/2019-09/schema", | |
"additionalProperties": false, | |
"properties": { | |
"client_id": { | |
"type": "string" | |
}, | |
"source_id": { | |
"type": "string" | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BEGIN { | |
package MyTypes; | |
use Type::Library -extends => ['Types::Standard'], -declare => qw< Transaction >; | |
use Type::Utils -all; | |
use JSON::Schema::AsType; | |
my $schema_uri | |
= 'https://gist.githubusercontent.com/j1n3l0/43676471d8121bfbce2835119201b3ed/' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BEGIN { | |
package MyTypes; | |
use Type::Library -extends => ['Types::Standard'], -declare => qw< Error >; | |
use Type::Utils -all; | |
declare Error, as Dict [ error => Str ]; | |
__PACKAGE__->meta->make_immutable(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const chai = require('chai'); | |
const chaiHttp = require('chai-http'); | |
const nock = require('nock'); | |
const axios = require('axios'); | |
chai.use(chaiHttp); | |
const { expect, request } = chai; | |
class Client { |
NewerOlder