Skip to content

Instantly share code, notes, and snippets.

@davorbadrov
davorbadrov / .editorconfig
Created May 6, 2018 07:16
Editor config for Javascript projects
root = true
[*.{js,json,yaml}]
indent_style = space
indent_size = 2
trim_trailing_whitespace = true
insert_final_newline = true
@davorbadrov
davorbadrov / extract_worklog.js
Last active March 11, 2019 17:24
Extracts working hours for JIRA
// The worklog has to be open in timesheets and
// Developer Console must be open with Right-click > Inspect so the source maps take effect.
// Paste and run the code inside the Console.
// Note: Tested only on Chrome.
_issueTitles = document.querySelectorAll('.tempo-issue-table-td-issue [title]')
_issueDescriptions = document.querySelectorAll('.tempo-issue-table-td-comment [title]')
_workedHours = document.querySelectorAll('.tempo-issue-table-td-worked [title]')
_log = ''
for (let i = 0; i < _issueTitles.length; i++) {
@davorbadrov
davorbadrov / script.exs
Created March 31, 2022 08:45
S3 Upload Elixir ExAws
file = "test.txt"
File.write(file, "this is a test")
config = ExAws.Config.new(:s3, [
region: "us-east-1",
access_key_id: "...",
secret_access_key: "..."
]
)