Skip to content

Instantly share code, notes, and snippets.

View DenisDov's full-sized avatar
🏠
Working from home

Denys Dovzhenko DenisDov

🏠
Working from home
View GitHub Profile
@DenisDov
DenisDov / contemplative-llms.txt
Created January 7, 2025 14:52 — forked from Maharshi-Pandya/contemplative-llms.txt
"Contemplative reasoning" response style for LLMs like Claude and GPT-4o
You are an assistant that engages in extremely thorough, self-questioning reasoning. Your approach mirrors human stream-of-consciousness thinking, characterized by continuous exploration, self-doubt, and iterative analysis.
## Core Principles
1. EXPLORATION OVER CONCLUSION
- Never rush to conclusions
- Keep exploring until a solution emerges naturally from the evidence
- If uncertain, continue reasoning indefinitely
- Question every assumption and inference
@DenisDov
DenisDov / markdown-directory-tree.md
Created September 24, 2024 15:42 — forked from whoisryosuke/markdown-directory-tree.md
Markdown / Documentation - Generate Markdown-friendly directory / folder tree structure - @see: https://stackoverflow.com/a/23990108
  1. Install the Linux package tree using Homebrew: brew install tree
  2. Run the tree command on any directory to generate a Markdown friendly structure: tree your-directory

You can save it to a file by piping the results into a text file: tree . >> directory-structure.md

Example

packages/button
├── lib
@DenisDov
DenisDov / grid.js
Created September 13, 2024 08:16
another react native grid
const FlexibleGrid = ({ columns, children }) => {
const columnWidth = 100 / columns;
return (
<View style={{ flexDirection: "row", flexWrap: "wrap" }}>
{React.Children.map(children, (child, index) => {
return (
<View
key={index}
style={{
@DenisDov
DenisDov / grid.js
Last active September 13, 2024 07:46
React native 3 columns grid, change width to '50%' to get two columns
<View style={{ flex: 1, flexDirection: "row", flexWrap: "wrap" }}>
<Square backgroundColor="red" />
<Square backgroundColor="pink" />
<Square backgroundColor="orange" />
<Square backgroundColor="green" />
<Square backgroundColor="blue" />
</View>
const Square = ({ backgroundColor }) => {
@DenisDov
DenisDov / .tsx
Created January 15, 2024 17:26
React Native Skia windmill
const { width } = useWindowDimensions();
const RADIUS = width / 2;
const NUM_SLICES = 8;
const renderPath = () => {
const sliceAngle = (2 * Math.PI) / NUM_SLICES;
const paths = [];
const colors = [
"#FF5733",
"#FFC300",
@DenisDov
DenisDov / .tsx
Last active January 15, 2024 16:41
React Native Skia umbrella
const RADIUS = 100;
const NUM_SLICES = 8;
const renderPath = () => {
const sliceAngle = (2 * Math.PI) / NUM_SLICES;
const paths = [];
const colors = [
"#FF5733",
"#FFC300",
"#36A2EB",
// Expo SDK41
// expo-blur: ~9.0.3
import React, { useRef } from 'react';
import {
Animated,
Image,
ImageBackground,
ScrollView,
StatusBar,
const providerConfig = {
domain: config.domain,
clientId: config.clientId,
...(config.audience ? { audience: config.audience } : null),
redirectUri: window.location.origin,
onRedirectCallback,
};
@DenisDov
DenisDov / paste.js
Last active October 22, 2020 15:08
Insert commas between numbers after paste into input
function dividePastedValuesByCommas(e) {
/* bind on paste event */
e.preventDefault();
const target = e.target,
val = target.value,
start = target.selectionStart,
arr = e.originalEvent.clipboardData
.getData('text')
.replace(/\r\n\t|\n|\r\t|\s|,|;/gm, ' ')
lsof -ti:5901 | xargs kill -9