Skip to content

Instantly share code, notes, and snippets.

View adriancmiranda's full-sized avatar
🌱
Today, what did you do for you tomorrow?

Adrian Miranda adriancmiranda

🌱
Today, what did you do for you tomorrow?
View GitHub Profile
@adriancmiranda
adriancmiranda / goto-sublime
Created April 17, 2022 18:18 — forked from kendellfab/goto-sublime
Add mouse click `goto definition` in sublime text 3.
Linux - create "Default (Linux).sublime-mousemap" in ~/.config/sublime-text-3/Packages/User
Mac - create "Default (OSX).sublime-mousemap" in ~/Library/Application Support/Sublime Text 3/Packages/User
Win - create "Default (Windows).sublime-mousemap" in %appdata%\Sublime Text 3\Packages\User
[
{
"button": "button1",
"count": 1,
"modifiers": ["ctrl"],
"press_command": "drag_select",
@adriancmiranda
adriancmiranda / index.js
Created January 26, 2022 01:39 — forked from djmadeira/index.js
"An Introduction to WebGL" tutorial code in vanilla JS
// From http://robots.thoughtbot.com/an-introduction-to-webgl
var app = function () {
var canvas = document.getElementById('canvas'),
gl = canvas.getContext('webgl') || canvas.getContext('experimental-webgl');
// Create elements on the page which contain your shaders.
// I like using script tags with a different type attribute, like:
// `<script id="vertex-shader" type="x-vertex/x-shader">`
// You could also just put the shaders inline, but I hate escaping line breaks.
var shaders = {
@adriancmiranda
adriancmiranda / commit-msg.js
Created August 10, 2021 11:14 — forked from bumbu/commit-msg.js
A script to prepend JIRA tag to the commit message based on branch name. Run from commit-msg git hook.
#!/usr/bin/env node
import * as fs from 'fs';
const JIRA_TAG = 'TAG';
/* If message title:
* * Doesn't start with square brackets []
* * Doesn't start with Merge branch
* * Doesn't start with Merge pull request
@adriancmiranda
adriancmiranda / tmux.conf
Created August 10, 2021 11:08 — forked from spicycode/tmux.conf
The best and greatest tmux.conf ever
# 0 is too far from ` ;)
set -g base-index 1
# Automatically set window title
set-window-option -g automatic-rename on
set-option -g set-titles on
#set -g default-terminal screen-256color
set -g status-keys vi
set -g history-limit 10000
#!/bin/bash
# run this scripts with `bash emoji-info.sh` or `./emoji-info.sh`
usage() {
cat << EOF
usage: $0 [options] <emoji>
Options:
-h Show this message
-o Octal Escape Sequence
@adriancmiranda
adriancmiranda / vsls
Created July 20, 2021 22:55 — forked from b333z/vsls
vccode live share nixos
#!/usr/bin/env bash
# TODO: Look at nixpkgs/pkgs/build-support/setup-hooks/auto-patchelf.sh
# https://ms-vsliveshare.gallery.vsassets.io/_apis/public/gallery/publisher/MS-vsliveshare/extension/vsliveshare/0.3.423/assetbyname/Microsoft.VisualStudio.Services.VSIXPackage
set -eu
TOOLS="patchelf xsel"
DEPS="utillinux.out openssl.out icu zlib curl.out lttng-ust libsecret libkrb5"
@adriancmiranda
adriancmiranda / tabc.sh
Created July 18, 2021 18:27 — forked from jpentland/tabc.sh
Add or remove windows from suckless' tabbed
#!/bin/sh
# Usage:
# tabc.sh <tabbed-id> <command>
# Commands:
# add <window-id> - Add window to tabbed
# remove <window-id> - Remove window from tabbed
# list - List all clients of tabbed
#
@adriancmiranda
adriancmiranda / tsconfig.json
Created July 3, 2021 18:36 — forked from cezaraugusto/tsconfig.json
JSON schema for the TypeScript compiler's configuration file
{
"title": "JSON schema for the TypeScript compiler's configuration file",
"$schema": "http://json-schema.org/draft-04/schema#",
"definitions": {
"filesDefinition": {
"properties": {
"files": {
"description": "If no 'files' or 'include' property is present in a tsconfig.json, the compiler defaults to including all files in the containing directory and subdirectories except those specified by 'exclude'. When a 'files' property is specified, only those files and those specified by 'include' are included.",
"type": "array",
@adriancmiranda
adriancmiranda / prepare-commit-msg
Created July 3, 2021 11:36 — forked from emirhg/prepare-commit-msg
prepare-commit-msg
#!/bin/zsh
# Author: "Emir Herrera" <emir.herrera@gmail.com>
# Donations: http://paypal.me/emirhg
#
# A GIT Hook to Pregenerate a Commit Message with an elapsed working time taken from the time tracker ActivityWatch. A `ref #123 @1.h` message like is generated taking the activity number from the branch name and te time from ActivityWatch Web API. Requires JQ in order to add all the events recorded by ActivityWatch
#
# Usage:
#
# copy this file under "${GIT_WORKING_TREE}/.git/hooks/prepare-commit-msg and set execution permitions
#
@adriancmiranda
adriancmiranda / TrueColour.md
Created July 2, 2021 01:50 — forked from XVilka/TrueColour.md
True Colour (16 million colours) support in various terminal applications and terminals

Terminal Colors

There exists common confusion about terminal colors. This is what we have right now:

  • Plain ASCII
  • ANSI escape codes: 16 color codes with bold/italic and background
  • 256 color palette: 216 colors + 16 ANSI + 24 gray (colors are 24-bit)
  • 24-bit true color: "888" colors (aka 16 milion)