Skip to content

Instantly share code, notes, and snippets.

View samuelematias's full-sized avatar

samuca samuelematias

View GitHub Profile
@samuelematias
samuelematias / Build Emacs for Windows 64bit with Native Compilation.md
Created November 17, 2023 18:11 — forked from nauhygon/Build Emacs for Windows 64bit with Native Compilation.md
Step-by-step instructions to build Emacs for Windows 64 bit with MSYS2 and MinGW-w64. Now `native-comp` supported.

Build Emacs-w64 with MSYS2/MinGW-w64 with Native Compilation

Instructions are modified from emacs-w64 Wiki page by zklhp. Many thanks for sharing!

  1. Download the latest MSYS2 from this download page.

  2. Install MSYS2 to, for example, C:\msys2 (make sure no space in path to avoid unwanted problems).

  3. Optionally prettify the MSYS2 console mintty with ~/.minttyrc to make it more pleasing to eyes. Thanks to this awesome theme!

@samuelematias
samuelematias / chat-gpt.el
Created August 25, 2023 20:32 — forked from vivekhaldar/chat-gpt.el
Emacs lisp to call out to Python script that calls ChatGPT API + Markdown derived mode for the chat transcripts.
;; Emacs Lisp wrapper around Python scripts for ChatGPT.
;;
;; Basic idea is to send buffer as stdin to Python script.
(defvar gpt-script "/Users/haldar/haskell/gpt_turbo/chat.py")
(defun vh/invoke-chat ()
"Send contents of current buffer as stdin to command, then append output to current buffer."
(interactive)
(let*
@samuelematias
samuelematias / chat.py
Created August 25, 2023 20:32 — forked from vivekhaldar/chat.py
Simple Python script to invoke ChatGPT API.
#!/usr/bin/env python3
#
# Takes a chat transcript (for ChatGPT) on stdin, calls the OpenAI
# ChatGPT API, and prints the response on stdout.
#
# Your OpenAI API key must be set in the environment variable
# OPENAI_API_KEY.
#
# Logs are written to ~/chat.log.
@samuelematias
samuelematias / .gitignore_default
Created February 16, 2023 18:51
Template of a simple default .gitignore
# Miscellaneous
*.class
*.log
*.pyc
*.swp
.DS_Store
.atom/
.buildlog/
.history
.svn/
import 'dart:developer';
import 'package:bloc/bloc.dart';
import 'package:sentry/sentry.dart';
class SentryBlocObserver extends BlocObserver {
SentryBlocObserver({Hub? hub}) : _hub = hub ?? HubAdapter();
final Hub _hub;
@samuelematias
samuelematias / custom-dracula-theme-for-slack.txt
Last active October 10, 2022 18:25
(custom!) Dracula theme for Slack.
#1E1F29,#44475A,#44475A,#9580FF,#6272A4,#FFFFFF,#50FA7B,#FF5555,#1E1F29,#9580FF
(use-package copilot
:straight (:host github :repo "zerolfx/copilot.el" :files ("dist" "copilot.el"))
:ensure t
:config
(global-unset-key (kbd "TAB"))
(global-set-key (kbd "TAB") (lambda (&optional ARG)
(interactive)
(or (copilot-accept-completion)
(indent-for-tab-command ARG))))
(with-eval-after-load 'company
@samuelematias
samuelematias / components.md
Created May 8, 2022 14:18 — forked from iclanzan/components.md
UI Component Name Ideas

UI component names

As front-end developers we all know the pain of coming up with meaningful component names for CSS classes. I created this gist as a place to collect terms that are suitable as user interface component names.

Please contribute your own ideas!

Interactive components

  • button
@samuelematias
samuelematias / create-file-in-repo.sh
Created April 25, 2022 21:30 — forked from steinbrueckri/create-file-in-repo.sh
Create file in GitHub Repo via API - Example
#!/bin/bash
MESSAGE="test"
TOKEN=$(cat ~/.github-token)
FILENAME="$RANDOM-date.txt"
CONTENT=$(date | base64)
USER="steinbrueckri"
REPO="api-test"
MESSAGE="hello world"

Org Mode Basics In Doom Emacs

Getting Started with Org Mode

Read org mode manual with M-x org-info. M-RET to insert new headline at current level.

org-toggle-heading : ,h

org-toggle-item : , i

  • Unordered list item one