- Refactor
- Feature
- Bug Fix
- Optimization
- Documentation
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
"The only way to do great work is to love what you do." - Steve Jobs | |
"Strive not to be a success, but rather to be of value." - Albert Einstein | |
"The future belongs to those who believe in the beauty of their dreams." - Eleanor Roosevelt | |
"The best and most beautiful things in the world cannot be seen or even touched - they must be felt with the heart." - Helen Keller | |
"It is during our darkest moments that we must focus to see the light." - Aristotle Onassis | |
"Believe you can and you're halfway there." - Theodore Roosevelt | |
"The only limit to our realization of tomorrow will be our doubts of today." - Franklin D. Roosevelt | |
"The journey of a thousand miles begins with a single step." - Lao Tzu | |
"What you get by achieving your goals is not as important as what you become by achieving your goals." - Henry David Thoreau | |
"The mind is everything. What you think you become." - Buddha |
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
# Function to get a random quote from a file (same as before) | |
get_random_quote() { | |
local quote_file="$HOME/.quotes.txt" | |
if [[ ! -f "$quote_file" ]]; then | |
echo "Error: Quotes file '$quote_file' not found." >&2 | |
return 1 | |
fi | |
local num_lines=$(wc -l < "$quote_file") | |
local random_line=$((RANDOM % num_lines + 1)) | |
sed -n "${random_line}p" "$quote_file" |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Ansi 0 Color</key> | |
<dict> | |
<key>Alpha Component</key> | |
<real>1</real> | |
<key>Blue Component</key> | |
<real>0.554656982421875</real> |
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 | |
/** | |
* CodeIgniter | |
* | |
* An open source application development framework for PHP | |
* | |
* This content is released under the MIT License (MIT) | |
* | |
* Copyright (c) 2019 - 2022, CodeIgniter Foundation | |
* |
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 * as Yup from "yup"; | |
const values = 0; | |
const msg = "value should be multiple of hundred"; | |
Yup.addMethod(Yup.number, "multipleOfHundred", function(msg) { | |
return this.test("test-name", msg, function(value) { | |
const { path, createError } = this; | |
return value % 100 === 0 && value !== 0; |
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 { useForm } from "react-hook-form"; | |
function MyForm() { | |
const { register, handleSubmit } = useForm({ | |
defaultValues: { | |
title: "", | |
description: "" | |
} | |
}); |
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
[ | |
{ | |
"type":"Component", | |
"id":"ImageAndText", | |
"label":"Image and Text", | |
"internal":false, | |
"isGlobal":false, | |
"allowNestedComponents":true, | |
"description":"Image and Text Row", | |
"attributes":{ |
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
[{"type":"Component","id":"ImageAndText","label":"Image and Text","internal":false,"isGlobal":false,"allowNestedComponents":true,"description":"Image and Text Row","attributes":{"image":{"type":"Image","label":"Image","url":{"type":"String","label":"URL","default":""},"altText":{"type":"String","label":"Alt text","default":""}},"title":{"type":"String","label":"Title","default":""},"description":{"type":"String","label":"Description","default":""},"ctaText":{"type":"String","label":"Button text","default":""},"ctaLink":{"type":"String","label":"Button link","default":""},"boxes":{"type":"Array","label":"box","default":[],"allowNestedComponents":true,"children":{"type":"Shape","default":{},"children":{"title":{"type":"String","label":"box title","default":"box"}}}},"buttons":{"label":"my button","type":"Array","default":{},"allowNestedComponents":false,"children":{"type":"Shape","default":{},"children":{"buttonTitle":{"type":"String","label":"box title","default":""}}}}}},{"type":"Component","id":"RichText","l |
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
// reduce | |
Object.defineProperty(Array.prototype, 'myReduce', { | |
value: function(fn, initial) { | |
let values = this; | |
values.forEach((item, idx) => { | |
initial = fn(initial, item, idx) | |
}) | |
return initial; |
NewerOlder