View list_fb_jira_status.fish
This file contains 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 list_fb_jira_status | |
set issues (ls ~/dev/git/sirius | grep utv-feature-sh- | grep -e '[a-zA-Z]\\+-[0-9]\\+' -o) | |
read -l -P 'jira username? ' username | |
read -l -i -P 'jira password? ' password | |
for issue in $issues | |
set -x json (curl -s -u $username:$password -X GET -H "Content-Type: application/json" "https://jira.sits.no/rest/api/2/issue/$issue?fields=status") | |
set issue_status (python -c 'import os,json;obj=json.loads(os.environ["json"]);status=obj["fields"]["status"]["name"];print status.encode("utf-8");') | |
echo $issue "(https://jira.sits.no/browse/$issue)" status: $issue_status |
View aoc_search.js
This file contains 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 () { | |
document | |
.querySelector('.user-profile p') | |
.appendChild(document.createElement('input')) | |
.addEventListener('keyup', (ev) => { | |
if (ev.target.value.length === 0) { | |
document.querySelectorAll('.console-table th, .console-table td').forEach(elem => (elem.style.display = '')); | |
} | |
if (ev.target.value.length > 2) { | |
const indexes = Array.from(document.querySelectorAll('.console-table thead th').entries()).filter(([idx, elem]) => elem.innerText.includes(ev.target.value)).map(([idx, elem]) => idx); |
View AOC_Sticky.js
This file contains 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 () { document.querySelectorAll('.console-table tr th:first-child,.console-table tr td:first-child').forEach(e => e.style = 'position: sticky; left: 0; min-width: 200px; background-color:white;');}()) |
View rm_f_branch.fish
This file contains 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 rm_f_branch | |
if test (count $argv) -eq 2 | |
set jira $argv[1] | |
set prefix $argv[2] | |
set env_name (echo utv-$prefix-$jira | tr '[:upper:]' '[:lower:]') | |
pushd ~/dev/git/sirius | |
echo "Deleting feature branch for $env_name" |
View mk_f_branch.fish
This file contains 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 mk_f_branch | |
if test (count $argv) -eq 2 | |
set jira $argv[1] | |
set prefix $argv[2] | |
set env_name (echo utv-$prefix-$jira | tr '[:upper:]' '[:lower:]') | |
pushd ~/dev/git/sirius | |
echo "Creating new feature branch for $env_name" |
View diff_stat_master.fish
This file contains 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 diff_stat_master | |
git remote update > /dev/null | |
set __master_commits (git rev-list HEAD..origin/master --count) | |
if test $__master_commits -gt 0 | |
echo "" | |
echo "- There are $__master_commits new commits on origin/master -" | |
echo "" | |
end | |
end |
View ocp.fish
This file contains 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 ocp | |
if test (count $argv) -gt 1 | |
set podname $argv[1] | |
set oc_cmd $argv[2] | |
set pods (oc get pods | grep -i running | grep $podname | awk '{print $1}') | |
if test (count $pods) -eq 0 | |
echo "=> Found no pods using filter: $podname" | |
oc project | |
oc get pods |
View elevator-saga-solution.js
This file contains 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
{ | |
operator: function(elevators) { | |
//console.log("create operator", elevators); | |
var distance = function (floor, elevatorFloor) { | |
return Math.abs(floor - elevatorFloor); | |
}; | |
var isClosest = function (fromFloor) { | |
return function (e) { | |
return distance(fromFloor, e.currentFloor()); | |
}; |
View elasticsearch.repo
This file contains 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
[elasticsearch-2.x] | |
name=Elasticsearch repository for 2.x packages | |
baseurl=http://packages.elastic.co/elasticsearch/2.x/centos | |
gpgcheck=1 | |
gpgkey=http://packages.elastic.co/GPG-KEY-elasticsearch | |
enabled=1 |
View jhome.fish
This file contains 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 jhome | |
set -x JAVA_HOME (/usr/libexec/java_home $argv) | |
echo "JAVA_HOME:" $JAVA_HOME | |
echo "java -version:" | |
java -version | |
end |
NewerOlder