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.
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;
(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"
@samuelematias
samuelematias / init.el
Created March 28, 2022 20:45 — forked from Lukewh/init.el
20210215 - Emacs config for typescript and CRA
(eval-and-compile
(customize-set-variable
'package-archives '(("org" . "https://orgmode.org/elpa/")
("melpa" . "https://melpa.org/packages/")
("gnu" . "https://elpa.gnu.org/packages/")))
(package-initialize)
(unless (package-installed-p 'use-package)
(package-refresh-contents)
(package-install 'use-package)))
@samuelematias
samuelematias / material_outlined_card.dart
Created March 28, 2022 16:23 — forked from rodydavis/material_outlined_card.dart
Flutter Material Outlined Card
import 'package:flutter/material.dart';
class OutlinedCard extends StatefulWidget {
const OutlinedCard({
Key? key,
required this.child,
}) : super(key: key);
final Widget child;
@samuelematias
samuelematias / .gitignore
Created January 3, 2022 14:30 — forked from dileepadev/.gitignore
.gitignore for Flutter projects
### ------------------------- Flutter.gitignore ------------------------ ###
# Miscellaneous
*.class
*.lock
*.log
*.pyc
*.swp
.DS_Store
.atom/