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
gem 'strava-ruby-client' | |
require 'strava-ruby-client' | |
client = Strava::Api::Client.new( | |
access_token: "access_code" | |
) | |
#time interval to update | |
after = Time.new(2022, 1, 1).to_i |
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
# running tests against all changed spec files | |
git status | grep 'spec' | sed -e "s/modified: //" | bundle exec rspec |
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
var list = []; | |
$('[data-sprint-id=<REPLACE HERE>] .ghx-summary .ghx-inner').each((e, node)=>{ list.push(node.innerHTML.replace(/"/g, "'"))}) | |
list.join("\n") |
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
require "test/unit/assertions" | |
include Test::Unit::Assertions | |
def quick_sort(array) | |
return array if array.size == 0 || array.size == 1 | |
left_pointer = 0 | |
pivot = array.last | |
pivot_index = array.size - 1 |
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 CALLS % TIME [uS / CALLS] | |
-------- ----- ------- ---- [----------] | |
io:o_request/3 1 0.00 0 [ 0.00] | |
io:put_chars/2 1 0.00 0 [ 0.00] | |
io:put_chars/3 1 0.00 0 [ 0.00] | |
io:request/2 2 0.00 0 [ 0.00] | |
io:execute_request/2 1 0.00 0 [ 0.00] | |
'Elixir.Plug.Session':call/2 |
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
query { | |
books { | |
title | |
} | |
} | |
FUNCTION CALLS % TIME [uS / CALLS] | |
-------- ----- ------- ---- [----------] | |
'Elixir.Plug.Session':call/2 1 0.00 0 [ 0.00] | |
'Elixir.Application':get_env/2 1 0.00 0 [ 0.00] |
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
SELECT 'ALTER TABLE '|| schemaname || '.' || tablename ||' OWNER TO username;' | |
FROM pg_tables WHERE NOT schemaname IN ('pg_catalog', 'information_schema') | |
ORDER BY schemaname, tablename; | |
SELECT 'ALTER SEQUENCE '|| sequence_schema || '.' || sequence_name ||' OWNER TO username;' | |
FROM information_schema.sequences WHERE NOT sequence_schema IN ('pg_catalog', 'information_schema') | |
ORDER BY sequence_schema, sequence_name; | |
SELECT 'ALTER VIEW '|| table_schema || '.' || table_name ||' OWNER TO username;' | |
FROM information_schema.views WHERE NOT table_schema IN ('pg_catalog', 'information_schema') |
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
unbind C-b | |
set -g prefix C-t | |
unbind '"' | |
bind-key h split-window -h -c '#{pane_current_path}' | |
unbind % | |
bind-key v split-window -v -c '#{pane_current_path}' | |
unbind [ | |
unbind n |
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
# list last vacuum e autovacuum time on each table | |
SELECT relname, last_vacuum, last_autovacuum FROM pg_stat_user_tables; | |
# Tools | |
# Explain explained | |
# https://explain.depesz.com/ | |
# Articles | |
# How analyze works: | |
# https://www.depesz.com/2013/04/16/explaining-the-unexplainable/ |
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
# Your init script | |
# | |
# Atom will evaluate this file each time a new window is opened. It is run | |
# after packages are loaded/activated and after the previous editor state | |
# has been restored. | |
# | |
# An example hack to log to the console when each text editor is saved. | |
# | |
# atom.workspace.observeTextEditors (editor) -> | |
# editor.onDidSave -> |