Skip to content

Instantly share code, notes, and snippets.

@iserdmi
iserdmi / m.sh
Created May 31, 2022 12:24
Call Makefile from child directory
m() {
findfiledir() {
if [ -f "$1" ]; then
echo "$PWD"
elif [ "$PWD" = / ]; then
false
else
(cd .. && findfiledir "$1")
fi
}
@iserdmi
iserdmi / 1.Implementation.ts
Last active January 30, 2023 11:00
ColumnFiller
// Live: https://startupgrad.io/#services
<ColumnFiller
items={services
.filter((service) => !selectedTag || service.tags.includes(selectedTag))
.map((service) => ({ ...service, key: service.textsKey }))}
columnsCount={windowWidth > 900 ? 3 : windowWidth > 600 ? 2 : 1}
columnRender={({ children, index, width }) => (
<div key={index} style={{ width }} className={css.column}>
{children}
@iserdmi
iserdmi / EditIdeaPage.ts
Created February 7, 2023 10:08
withPageWrapper
import { zUpdateIdeaInput } from '@ideanick/backend/src/router/ideas/updateIdea/input'
import { canEditIdea } from '@ideanick/backend/src/utils/can'
import { pick } from '@ideanick/shared/src/pick'
import { useNavigate, useParams } from 'react-router-dom'
import { Alert } from '../../../components/Alert'
import { Button } from '../../../components/Button'
import { FormItems } from '../../../components/FormItems'
import { Input } from '../../../components/Input'
import { Segment } from '../../../components/Segment'
import { Textarea } from '../../../components/Textarea'