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 / modal_navigation_bar.dart
Last active November 16, 2023 05:47
If you need a modal (showModalBottomSheet) but you have a bottomnavigationbar and the modal needs to be on top of the bottomnavigationbar, use the userootnavigator = true property of showModalBottomSheet.
// This example on Dartpad:
// https://dartpad.dev/cbbfed060a664b6fdaf4229b02cd1add
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
@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 / flutter_all_fastlane.sh
Created June 23, 2020 23:15 — forked from rodydavis/flutter_all_fastlane.sh
Using Fastlane for Flutter to deploy iOS, Mac, Android and Web
# This file contains the fastlane.tools configuration
# You can find the documentation at https://docs.fastlane.tools
#
# For a list of all available actions, check out
#
# https://docs.fastlane.tools/actions
#
# For a list of all available plugins, check out
#
# https://docs.fastlane.tools/plugins/available-plugins
@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