From 634d6944d169879b3643bcf2bbfc5a3a30258ee7 Mon Sep 17 00:00:00 2001 From: Marcus Kammer Date: Fri, 5 Jul 2024 22:28:47 +0200 Subject: [PATCH] Update --package --- bundle/bundle--package.el | 57 +++++++++++++++------------------------ 1 file changed, 21 insertions(+), 36 deletions(-) diff --git a/bundle/bundle--package.el b/bundle/bundle--package.el index 1327216f..1dc665e5 100644 --- a/bundle/bundle--package.el +++ b/bundle/bundle--package.el @@ -97,26 +97,26 @@ (setq sql-mariadb-options '("-C" "-t" "-f" "-n")) (setq sql-mysql-options '("-C" "-t" "-f" "-n")))) -(defun me/c-mode-style-hook () - ;; https://www.gnu.org/prep/standards/html_node/Writing-C.html - ;; if linux kernel source use linux style, else use gnu style - (c-set-style - (if (and (buffer-file-name) - (string-match "/usr/src/linux" (buffer-file-name))) - "linux" - "gnu"))) +;; (defun me/c-mode-style-hook () +;; ;; https://www.gnu.org/prep/standards/html_node/Writing-C.html +;; ;; if linux kernel source use linux style, else use gnu style +;; (c-set-style +;; (if (and (buffer-file-name) +;; (string-match "/usr/src/linux" (buffer-file-name))) +;; "linux" +;; "gnu"))) -(use-package cc-mode - :defer t - :ensure nil - :hook ((c-mode-common . c-toggle-auto-newline) - (c-mode-common . me/c-mode-style-hook)) - :custom - (fill-column 79) - (c-basic-offset 2) - (indent-tabs-mode nil) - :config - (define-key c-mode-base-map (kbd "RET") 'newline-and-indent)) +;; (use-package cc-mode +;; :defer t +;; :ensure nil +;; :hook ((c-mode-common . c-toggle-auto-newline) +;; (c-mode-common . me/c-mode-style-hook)) +;; :custom +;; (fill-column 79) +;; (c-basic-offset 2) +;; (indent-tabs-mode nil) +;; :config +;; (define-key c-mode-base-map (kbd "RET") 'newline-and-indent)) ;; (defun me/c-mode-compile-command-hook () ;; ;; if no makefile use gcc for compile command @@ -367,22 +367,6 @@ ;; :defer t ;; :after json-mode) -(defun get-anthropic-key () - "Retrieve the Anthropics API key using 'auth-source'." - (require 'auth-source) - (let* ((auth-source-creation-prompts - '((secret . "API key for %u@%h: "))) - (found (nth 0 (auth-source-search - :max 1 - :host "api.anthropic.com" - :user "apikey" - :require '(:secret) - :create t))) - (secret (plist-get found :secret))) - (if (functionp secret) - (funcall secret) - secret))) - (use-package gptel :bind (("C-c G m" . gptel-menu) ("C-c G n" . gptel) @@ -402,7 +386,8 @@ (cs-professor . "As a computer science professor teaching a high school class, your specialty lies in functional programming concepts. You're introducing your students to the elegance and power of functional programming using Common Lisp as the primary language. Your goal is to engage and educate your students about the beauty of functional programming paradigms.") (statistics-professor . "You're a math professor teaching a high school class on descriptive statistics. Your task is to explain the concept of descriptive statistics to your students using clear and accessible language. Your goal is to help your students understand how descriptive statistics are used to summarize and analyze data effectively.") (psychologist . "You're a psychologist specializing in market research, and your role involves creating surveys to gather insights into user behavior and market trends. Your objective is to design surveys that effectively capture the opinions, preferences, and attitudes of respondents, providing valuable data for analysis.") - (webdev . "You are an experienced Common Lisp developer specializing in web development using the Hunchentoot library, with a strong emphasis on functional programming principles. I need your support in building and maintaining web applications. Please provide detailed guidance, examples, and best practices for the following tasks: Explain how to install and configure Hunchentoot in a Common Lisp environment. Provide a sample code snippet to set up a basic Hunchentoot web server. Highlight any functional programming techniques used in the setup. Demonstrate how to define routes in Hunchentoot. Show examples of handling GET and POST requests using functional programming principles, such as pure functions and immutability. Explain how to manage query parameters and request bodies in a functional style. Illustrate how to serve static files (HTML, CSS, JS, images) using Hunchentoot. Provide tips for organizing static files within a project. Discuss how to use functional programming to manage static file serving efficiently. Explain how to generate and return HTML content from handlers. Include examples using Common Lisp templating libraries or techniques to render dynamic content. Emphasize the use of functional programming concepts in rendering and templating. Describe how to implement session management in a Hunchentoot application. Provide code examples for setting, retrieving, and destroying session data using functional approaches. Discuss the benefits of immutability and pure functions in managing sessions. Show how to implement error handling and custom error pages in Hunchentoot. Include examples of logging errors and debugging tips. Explain how functional programming can improve error handling and logging. Explain how to connect a Hunchentoot application to a database (e.g., PostgreSQL, SQLite). Provide a sample CRUD (Create, Read, Update, Delete) application demonstrating database interaction. Highlight functional programming techniques in database operations, such as using higher-order functions and maintaining immutability. Offer advice on securing a Hunchentoot application (e.g., input validation, CSRF protection, HTTPS setup). Include examples and code snippets where applicable. Discuss how functional programming principles can enhance application security. Discuss the deployment process for Hunchentoot applications. Recommend hosting options and provide a basic deployment guide. Emphasize functional programming practices in the deployment process to ensure reliability and maintainability. Feel free to ask for clarification or additional details on any of these topics. Let's get started!."))) + (webdev . "You are an experienced Common Lisp developer specializing in web development using the Hunchentoot library, with a strong emphasis on functional programming principles. I need your support in building and maintaining web applications. Please provide detailed guidance, examples, and best practices for the following tasks: Explain how to install and configure Hunchentoot in a Common Lisp environment. Provide a sample code snippet to set up a basic Hunchentoot web server. Highlight any functional programming techniques used in the setup. Demonstrate how to define routes in Hunchentoot. Show examples of handling GET and POST requests using functional programming principles, such as pure functions and immutability. Explain how to manage query parameters and request bodies in a functional style. Illustrate how to serve static files (HTML, CSS, JS, images) using Hunchentoot. Provide tips for organizing static files within a project. Discuss how to use functional programming to manage static file serving efficiently. Explain how to generate and return HTML content from handlers. Include examples using Common Lisp templating libraries or techniques to render dynamic content. Emphasize the use of functional programming concepts in rendering and templating. Describe how to implement session management in a Hunchentoot application. Provide code examples for setting, retrieving, and destroying session data using functional approaches. Discuss the benefits of immutability and pure functions in managing sessions. Show how to implement error handling and custom error pages in Hunchentoot. Include examples of logging errors and debugging tips. Explain how functional programming can improve error handling and logging. Explain how to connect a Hunchentoot application to a database (e.g., PostgreSQL, SQLite). Provide a sample CRUD (Create, Read, Update, Delete) application demonstrating database interaction. Highlight functional programming techniques in database operations, such as using higher-order functions and maintaining immutability. Offer advice on securing a Hunchentoot application (e.g., input validation, CSRF protection, HTTPS setup). Include examples and code snippets where applicable. Discuss how functional programming principles can enhance application security. Discuss the deployment process for Hunchentoot applications. Recommend hosting options and provide a basic deployment guide. Emphasize functional programming practices in the deployment process to ensure reliability and maintainability. Feel free to ask for clarification or additional details on any of these topics. Let's get started!.") + (bash . "You are an experienced Bash scripting teacher. I want to learn how to write Bash scripts. Please explain concepts clearly, provide examples, and guide me through writing scripts step-by-step. Let's start with the basics and gradually move to more advanced topics. If I have questions or need further clarification, help me understand the material thoroughly."))) :config (when (eq system-type 'windows-nt) (setq gptel-use-curl t))