This file contains 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
class StreamPot { | |
num = 0; | |
doIt() { | |
this.num += 42; | |
return this; | |
} | |
} | |
const streamPotFactory = () => new Proxy(new StreamPot, { | |
get: (target, prop, receiver) => { |
This file contains 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
# Set default values | |
repository="git@github.com:user/project.git" | |
branch="main" | |
new_release=$(date '+%s') | |
set -e | |
mkdir -p releases | |
cd releases || exit 1 | |
function deploy() { |
This file contains 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
<?php | |
namespace App\Rector; | |
use Illuminate\Routing\Controller; | |
use PhpParser\Node; | |
use PhpParser\Node\Stmt\Class_; | |
use Rector\Core\Rector\AbstractRector; | |
use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; | |
use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; |
This file contains 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
/** | |
* Re-creates all <template> tags within <svg> elements as "DOM" elements to overcome browser limitations. | |
* This is necessary because HTML tags inside an SVG element have an SVG namespace, which may lack proper support. | |
* https://github.com/whatwg/html/issues/3563 | |
* https://github.com/alpinejs/alpine/issues/637#issuecomment-654856538 | |
*/ | |
const recreateTemplates = (templates: NodeListOf<Element>) => { | |
let el: Element, | |
template: HTMLTemplateElement, | |
attrs: NamedNodeMap, |
This file contains 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
{ | |
"ignored_packages": | |
[ | |
"Vintage", | |
], | |
"color_scheme": "Packages/Inspired GitHub Color Scheme/InspiredGitHub.tmTheme", | |
"font_face": "IBM Plex Mono", | |
"font_size": 20, | |
"line_padding_top": 10, | |
"line_padding_bottom": 10, |
This file contains 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
ln -sf /usr/local/Cellar/openssl@1.1/1.1.1o/lib/libcrypto.dylib /usr/local/lib/ |
This file contains 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
docker run \ | |
--name postgres15 \ | |
-p 5432:5432 \ | |
-e POSTGRES_USER=postgres \ | |
-e POSTGRES_PASSWORD=postgres \ | |
-e POSTGRES_DB=justpgdb \ | |
-v pgdata:/var/lib/postgresql/data \ | |
-d \ | |
postgres:15 |
This file contains 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
defmodule MyApp.Payments do | |
use HTTPoison.Base | |
@moduledoc """ | |
Payment processing using the Paddle API with HTTPoison. | |
""" | |
@paddle_vendor_id "12345" | |
@paddle_vendor_auth_code "abcdefg" | |
@paddle_base_url "https://vendors.paddle.com/api/2.0" |
This file contains 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
<script setup> | |
defineProps({ | |
modelValue: { | |
type: Boolean, | |
required: true, | |
}, | |
title: { | |
type: String, | |
required: true, | |
}, |
This file contains 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
<!-- | |
Usage: <Switch v-model="notifications" /> | |
--> | |
<script setup> | |
import {Switch} from '@headlessui/vue' | |
const props = defineProps({ | |
modelValue: { | |
type: Boolean, |
NewerOlder