Skip to content

Instantly share code, notes, and snippets.

View narenaryan's full-sized avatar
🏠
Dreaming Big

N3N narenaryan

🏠
Dreaming Big
View GitHub Profile
@narenaryan
narenaryan / medium-topics.yaml
Last active July 3, 2024 04:44
A grouped topics based on main topic
Life:
- Family
- Adoption
- Children
- Elder Care
- Fatherhood
- Motherhood
- Health:
- Aging
- Coronavirus
@narenaryan
narenaryan / prog_05.go
Last active May 29, 2024 02:26
A go program to configure TLS for server certificate
package main
import (
"crypto/tls"
"crypto/x509"
"encoding/pem"
"fmt"
"net/http"
"os"
"time"
@narenaryan
narenaryan / cert_pool.go
Last active May 28, 2024 01:30
A certificate pool in Go to verify server certificates from clients
func getCertPool(fileName string) *x509.CertPool {
// Load the server certificate from a file
certBytes, err := os.ReadFile(fileName)
if err != nil {
fmt.Println("Error reading certificate file:", err)
return nil
}
// Decode the PEM-encoded certificate
pemBlock, _ := pem.Decode(certBytes)
@narenaryan
narenaryan / prompt.xml
Created May 19, 2024 01:33
A XML prompt generated from PromptML
<prompt>
<context>As a mental health professional, you are tasked with creating a comprehensive monthly mental health plan for individuals seeking to improve their well-being and emotional resilience.</context>
<objective>Develop a structured plan that incorporates various strategies and activities to promote mental wellness, manage stress, and enhance overall psychological health.</objective>
<instructions>
<item>Identify the individual's current mental health status and any specific challenges or goals they may have.</item>
<item>Create a personalized self-care routine that includes activities like mindfulness exercises, relaxation techniques, physical exercise, and hobbies.</item>
<item>Suggest strategies for coping with stress, anxiety, or depression, such as journaling, deep breathing exercises, or seeking professional support.</item>
<item>Recommend resources for mental health education, such as books, podcasts, or online courses, to enhance self-awareness and
@narenaryan
narenaryan / cohere-output.txt
Created April 28, 2024 21:20
A melancholic poem
Here lies a boy, within these castle walls,
A prisoner, he gazes out, beyond the lofty halls.
His heart, once full of mirth and glee, now yearns and aches,
For he is locked away, his freedom, a distant memory.
The sun still shines, and the birds still sing,
But their melody reaches him, on desolate wings.
He remembers the warmth of the morning light,
Now obscured by the shadows of an endless night.
Context: {{ prompt.context }}
{% if prompt.instructions|length > 1 %}
Follow the below instructions step-by-step for objective:
{% for instruction in prompt.instructions -%}
{{loop.index}}. {{ instruction }}
{% endfor %}
{% endif %}
Examples:
{% for example in prompt.examples -%}
@narenaryan
narenaryan / poem.pml
Created April 28, 2024 20:52
A PromptML prompt for writing a poem
@prompt
@context
You are a master poem writer who is creative and imaginative. You identify the beauty in the world and express it through your words and use vivid imagery and descriptive language to create a poem.
@end
@objective
Write a poem that describes a boy who locked in castle leaving behind his family and friends.
@end
@examples
@example
@input
package main
import (
"fmt"
"net/http"
"time"
)
func main() {
// Create a new transport
package main
import (
"fmt"
"net/http"
"time"
)
func main() {
client := &http.Client{Timeout: 5 * time.Second}
package main
import (
"fmt"
"net/http"
"time"
)
func main() {
client := &http.Client{Timeout: 5 * time.Second}