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
https://developers.strava.com/ | |
https://developers.strava.com/docs/webhooks/ | |
https://developers.strava.com/docs/webhookexample/ |
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
// custom style using sass & tailwindcss | |
.vscomp-ele { | |
max-width: 100% !important; | |
.vscomp-toggle-button { | |
@apply mt-1 border-gray-300 transition block w-full duration-150 rounded-md shadow-inner bg-gray-100 py-3; | |
&:focus { | |
@apply border border-info ring-info ring-opacity-25; |
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
// resources/views/app/version.blade.php | |
<div> | |
<span>{{ config('version.string') }}</span> | |
<span>&mdsh;</span> | |
<span>{{ config('app.env') }}</span> | |
<span>—</span> | |
<span>{{ 'Laravel ' . app()->version() }}</span> | |
<span>—</span> | |
<span>{{ app()->getLocale() }}</span> |
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 | |
/** | |
* Put this in bootstrap/helpers.php | |
* Add "files" key in composer.json > autoload: "files": ["bootstrap/helpers.php"] | |
* @see https://stackoverflow.com/questions/2510434/format-bytes-to-kilobytes-megabytes-gigabytes | |
*/ | |
function formatBytes(int $bytes, $precision = 2) | |
{ | |
$units = ['B', 'KB', 'MB', 'GB', 'TB']; |
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 | |
// src/Log.php | |
namespace App; | |
/** | |
* Barebones error logging class | |
* | |
* Location: <project root>/src/Log.php | |
* | |
* Usage: |
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
<!-- | |
resources/js/app.js | |
Put this code at the bottom of `app.js` | |
OR | |
Put it in a `clipboard.js` file and import it in `app.js` with: | |
require('./clipboard'); | |
--> | |
window.initClipboard = () => { |
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
#!/bin/bash | |
echo -n "Enter a prompt: " | |
read prompt | |
echo -n "Steps (default 10): " | |
read steps | |
if [[ -z "$steps" ]]; then | |
steps=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
import argparse, os, sys, glob | |
import cv2 | |
import torch | |
import numpy as np | |
from omegaconf import OmegaConf | |
from PIL import Image | |
from tqdm import tqdm, trange | |
from imwatermark import WatermarkEncoder | |
from itertools import islice | |
from einops import rearrange |
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\Support; | |
use InvalidArgumentException; | |
class Bytes | |
{ | |
// Most modern systems use base-1000 rather than base-1024 for file size now | |
protected const BASE = 1000; |
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
{ | |
"version": "1.0.2", | |
"notes": "1.0.2 update", | |
"pub_date": "2023-02-13T21:42:04.140Z", | |
"platforms": { | |
"darwin-x86_64": { | |
"signature": "", | |
"url": "https://github.com/breadthe/seismic/releases/download/v1.0.2/seismic.app.tar.gz" | |
}, | |
"darwin-aarch64": { |