import React, { useState, useCallback } from 'react';
import { View, Text, TextInput, TouchableHighlight } from 'react-native';
import { connect } from 'react-redux';
import { Dispatch } from 'redux';
import { styles } from './Counter.styles';
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
// Ensures tailwind intellisense works in non-standard places that we want | |
"tailwindCSS.experimental.classRegex": [ | |
// for usages like: clsx('bg-accent') | |
["clsx\\(([^)]*)\\)", "(?:'|\")([^'\"]*)(?:'|\")"], | |
// within our Theme definition objects | |
[": Theme<[^>]*>([^;]*)", ":\\s*?[\"'`]([^\"'`]*).*?,?"] | |
], |
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,"resource":"file:///Users/jake/code/bin-scraper/app/root.tsx","entries":[{"id":"3wXE.tsx","timestamp":1665758642740}]} |
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 { useMemo } from 'react'; | |
export const makeUseStyles = cb => (...args) => { | |
const styleObj = useMemo(() => cb(...args), args); | |
const styleSheet = useMemo(() => { | |
return Object.entries(styleObj).reduce((acc, [className, classes]) => { | |
acc[className] = classes.join(' '); | |
return acc; |
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
code --install-extension akamud.vscode-theme-onedark | |
code --install-extension be5invis.vscode-custom-css | |
code --install-extension bmewburn.vscode-intelephense-client | |
code --install-extension bradlc.vscode-tailwindcss | |
code --install-extension codingyu.laravel-goto-view | |
code --install-extension cpylua.language-postcss | |
code --install-extension dbaeumer.vscode-eslint | |
code --install-extension dollyn.line-counter | |
code --install-extension ericadamski.carbon-now-sh | |
code --install-extension esbenp.prettier-vscode |
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\Helpers; | |
use Illuminate\Support\Collection; | |
class Piper | |
{ | |
/** | |
* The symbol that will be replaced with the current value. |
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
const delay = (ms, token = null) => new Promise((resolve, reject) => { | |
const cancelled = () => reject({ cancelled: true }); | |
if (token && token.cancelled) { | |
return cancelled(); | |
} | |
const timeout = setTimeout(() => { | |
if (!token || !token.cancelled) { | |
resolve(); |
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 | |
/* | |
* This will still be mutable | |
*/ | |
use Carbon\Carbon; | |
$date = Carbon::now(); | |
/* |
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\Providers; | |
use Illuminate\Support\ServiceProvider; | |
// The Date facade | |
use Illuminate\Support\Facades\Date; | |
// And the CarbonImmutable class |
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 | |
$mutable = Carbon::now(); | |
$immutable = CarbonImmutable::now(); | |
$modifiedMutable = $mutable->add(1, 'day'); | |
$modifiedImmutable = CarbonImmutable::now()->add(1, 'day'); | |
var_dump($modifiedMutable === $mutable); // bool(true) | |
var_dump($mutable->isoFormat('dddd D')); // string(8) "Sunday 3" | |
var_dump($modifiedMutable->isoFormat('dddd D')); // string(8) "Sunday 3" |
NewerOlder