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\Console\Commands; | |
use File; | |
use Illuminate\Console\Command; | |
use Illuminate\Database\Eloquent\Model; | |
use Illuminate\Support\Str; | |
use ReflectionClass; | |
use ReflectionException; |
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\Console\Commands; | |
use Illuminate\Console\Command; | |
/** | |
* https://adventofcode.com/2023/day/1/input | |
* https://adventofcode.com/2023/day/1 | |
*/ |
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\Console\Commands; | |
use App\Models\User; | |
use DB; | |
use Exception; | |
use Illuminate\Console\Command; | |
use function Laravel\Prompts\info; |
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
<template> | |
<div> | |
Welcome<br /> | |
<SampleVueComponent :testing-prop="'test'" /> | |
</div> | |
</template> | |
<script lang="ts"> | |
import { defineComponent, ref } from 'vue'; |
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
<template> | |
<div @click="someTest"> | |
{{preMessage}} {{message}} | |
</div> | |
</template> | |
<script lang="ts"> | |
interface Mehtods { | |
someTest: () => void; | |
} |
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
from typing import Dict, Union | |
def read_env(key: str = False, default_value: str = '') -> Union[str, Dict[str, str]]: | |
""" | |
Open the venv/pyvenv.cfg file for reading and return a key value or all the settings | |
:param key: | |
:param default_value: | |
:return: | |
""" |
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
import { useState } from 'react'; | |
import useService, { DELETE, PUT } from 'hooks/useService'; | |
const useFileUploadHook = () => { | |
const [{}, fireApi] = useService(); | |
const [filesUploaded, setFilesUploaded] = useState(1); | |
const [uploading, setUploading] = useState(false); | |
const [overallProgress, setOverallProgress] = useState(0); | |
const mashToS3 = async ({ file, goalPercentage, url }) => { |
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
import { useState, useEffect } from 'react'; | |
const usePolling = ({ | |
timeoutMs = 5000, | |
continuePolling, | |
} = {}) => { | |
const [ticker, setTicker] = useState(null); | |
const [onContinuePolling, setOnContinuePolling] = useState(null); | |
useEffect(() => { |
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
# http://editorconfig.org | |
root = true | |
[*] | |
charset = utf-8 | |
end_of_line = lf | |
indent_size = 4 | |
indent_style = space | |
insert_final_newline = true | |
trim_trailing_whitespace = 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
import {randomString} from './string'; | |
export const sleeper = (ms, {message = undefined, debug = false} = {}) => { | |
debug && console.log("sleeper initialized"); | |
const hash = randomString(); | |
const registry = {valid: true, tickCount: 0, timers: []}; | |
let timer = null; |
NewerOlder