- Go to Tools > New Plugin
- Paste timestamp.py contents and save in User as timestamp.py
- Open Preferences > Key Bindings - User (or Default, your call)
- Paste keybindings.json, or add a line to your keybindings
- Customize the keyboard shortcut to your liking and save
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| # Creates a git worktree for a feature branch and navigates into it. | |
| # | |
| # Creates a new git worktree in the parent directory of the current | |
| # repository. | |
| # | |
| # The worktree directory is named "{repoName}-{FeatureBranchName}" and | |
| # the branch is created as "tiagoa/{FeatureBranchName}". | |
| # |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function New-FeatureWorktree { | |
| <# | |
| .SYNOPSIS | |
| Creates a git worktree for a feature branch and navigates into it. | |
| .DESCRIPTION | |
| Creates a new git worktree in the parent directory of the current repository. | |
| The worktree directory is named "{repoName}-{FeatureBranchName}" and the branch | |
| is created as "tiagoa/{FeatureBranchName}". |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| javascript:(function() { | |
| const categories = Object.fromEntries(Array.from(document.querySelectorAll("#idSkillCategoryId > option")).map(option => [option.value, option.text])); | |
| const separator = "\t"; /* Yeah, tab separated CSV. Deal with it.*/ | |
| const tsvHeader = ["skillname", "category", "lastresult", "pr", "tries", "daysince"].join(separator); | |
| const tsvData = personResults.resultSet.map(res => [res.skillname, categories[res.categoryid],res.lastresult, res.pr, res.tries, res.daysince].join(separator)); | |
| const tsvContent = [tsvHeader].concat(tsvData).join("\n"); | |
| const blob = new Blob([tsvContent], { type: 'text/csv' }); | |
| /* Initiate download of CSV data */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| set -e | |
| function listContexts() { | |
| kubectl config get-contexts | sed -e 's/^ /off/' -e 's/^\*/on/' -e 1d | awk '{printf("%i\n%s\n", (NR-1),$2)}' | |
| } | |
| # https://stackoverflow.com/questions/11426529/reading-output-of-a-command-into-an-array-in-bash | |
| IFS=$'\n' read -r -d '' -a contexts < <( listContexts && printf '\0' ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| set -e | |
| selected=$( | |
| dialog --radiolist "Choose cluster" 0 0 0 $( | |
| kubectl config get-contexts | sed -e 's/^ /off/' -e 's/^\*/on/' -e 1d | awk '{print $2,$3,$1 }' | |
| ) 2>&1 > /dev/tty | |
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from dataclasses import dataclass | |
| import pathlib | |
| import yaml | |
| from operator import itemgetter | |
| YAML_SUFFIX_LENGTH = len('.yaml') | |
| @dataclass | |
| class Component: | |
| building_block: str |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # -*- coding: utf-8 -*- | |
| from datetime import datetime | |
| import time | |
| import sublime_plugin | |
| class TimestampCommand(sublime_plugin.EventListener): | |
| """Expand `isoD`, `now`, `datetime`, `utcnow`, `utcdatetime`, | |
| `date` and `time` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| %YAML 1.2 | |
| --- | |
| # See http://www.sublimetext.com/docs/3/syntax.html | |
| name: relatorio | |
| file_extensions: [md] | |
| scope: text.html.markdown | |
| contexts: | |
| main: | |
| - match: '\b(PENDING)\b' | |
| scope: keyword.control.c |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| export ELASTICSEARCH_ENDPOINT="http://localhost:9200" | |
| # Create indexes | |
| # DELETE indexes consecutive tests | |
| curl -XDELETE "$ELASTICSEARCH_ENDPOINT/play" | |
| curl -XPUT "$ELASTICSEARCH_ENDPOINT/play" -d '{ |
NewerOlder