Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
sant123 committed Mar 29, 2023
0 parents commit 50c338e
Show file tree
Hide file tree
Showing 6 changed files with 146 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/deno.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

# This workflow will install Deno then run `deno lint` and `deno test`.
# For more information see: https://github.com/denoland/setup-deno

name: Deno

on:
push:
branches: ['master']
pull_request:
branches: ['master']

permissions:
contents: read

jobs:
test:
runs-on: ubuntu-latest

steps:
- name: Setup repo
uses: actions/checkout@v3

- name: Setup Deno
uses: denoland/setup-deno@v1
with:
deno-version: v1.x

- name: Verify formatting
run: deno fmt --check

- name: Run linter
run: deno lint

- name: Run tests
run: deno test --doc
11 changes: 11 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"deno.enable": true,
"deno.lint": true,
"deno.unstable": false,
"[typescript]": {
"editor.defaultFormatter": "denoland.vscode-deno"
},
"[markdown]": {
"editor.defaultFormatter": "denoland.vscode-deno"
}
}
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2023 Santiago Aguilar Hernández

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
25 changes: 25 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# inspire [![Deno](https://github.com/sant123/inspire/actions/workflows/deno.yml/badge.svg)](https://github.com/sant123/inspire/actions/workflows/deno.yml)

Based on the inspire Artisan command from
[Laravel](https://github.com/laravel/framework/blob/10.x/src/Illuminate/Foundation/Inspiring.php).

## Installation

```shell
deno install -fq https://deno.land/x/inspire/mod.ts
```

<img src="./images/inspire.png">

## Usage

```ts
// example.ts
import { quotes } from "https://deno.land/x/inspire/mod.ts";
console.log(quotes);
// Your code here...
```

## Credits

https://laravel.com/
Binary file added images/inspire.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
49 changes: 49 additions & 0 deletions mod.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
export const quotes = [
"Act only according to that maxim whereby you can, at the same time, will that it should become a universal law. - Immanuel Kant",
"An unexamined life is not worth living. - Socrates",
"Be present above all else. - Naval Ravikant",
"Do what you can, with what you have, where you are. - Theodore Roosevelt",
"Happiness is not something readymade. It comes from your own actions. - Dalai Lama",
"He who is contented is rich. - Laozi",
"I begin to speak only when I am certain what I will say is not better left unsaid. - Cato the Younger",
"I have not failed. I've just found 10,000 ways that won't work. - Thomas Edison",
"If you do not have a consistent goal in life, you can not live it in a consistent way. - Marcus Aurelius",
"It is never too late to be what you might have been. - George Eliot",
"It is not the man who has too little, but the man who craves more, that is poor. - Seneca",
"It is quality rather than quantity that matters. - Lucius Annaeus Seneca",
"Knowing is not enough; we must apply. Being willing is not enough; we must do. - Leonardo da Vinci",
"Let all your things have their places; let each part of your business have its time. - Benjamin Franklin",
"Live as if you were to die tomorrow. Learn as if you were to live forever. - Mahatma Gandhi",
"No surplus words or unnecessary actions. - Marcus Aurelius",
"Nothing worth having comes easy. - Theodore Roosevelt",
"Order your soul. Reduce your wants. - Augustine",
"People find pleasure in different ways. I find it in keeping my mind clear. - Marcus Aurelius",
"Simplicity is an acquired taste. - Katharine Gerould",
"Simplicity is the consequence of refined emotions. - Jean D'Alembert",
"Simplicity is the essence of happiness. - Cedric Bledsoe",
"Simplicity is the ultimate sophistication. - Leonardo da Vinci",
"Smile, breathe, and go slowly. - Thich Nhat Hanh",
"The only way to do great work is to love what you do. - Steve Jobs",
"The whole future lies in uncertainty: live immediately. - Seneca",
"Very little is needed to make a happy life. - Marcus Aurelius",
"Waste no more time arguing what a good man should be, be one. - Marcus Aurelius",
"Well begun is half done. - Aristotle",
"When there is no desire, all things are at peace. - Laozi",
"Walk as if you are kissing the Earth with your feet. - Thich Nhat Hanh",
"Because you are alive, everything is possible. - Thich Nhat Hanh",
"Breathing in, I calm body and mind. Breathing out, I smile. - Thich Nhat Hanh",
"Life is available only in the present moment. - Thich Nhat Hanh",
"The best way to take care of the future is to take care of the present moment. - Thich Nhat Hanh",
"Nothing in life is to be feared, it is only to be understood. Now is the time to understand more, so that we may fear less. - Marie Curie",
"The biggest battle is the war against ignorance. - Mustafa Kemal Atatürk",
"Always remember that you are absolutely unique. Just like everyone else. - Margaret Mead",
"You must be the change you wish to see in the world. - Mahatma Gandhi",
];

if (import.meta.main) {
const quote = quotes[Math.floor(Math.random() * quotes.length)];
const [text, author] = quote.split(/\s*-\s*/);

console.log(` %c“ ${text} ”`, "font-weight: bold");
console.log(` %c— ${author}`, "color: gray");
}

0 comments on commit 50c338e

Please sign in to comment.