Bash script to:
- Iterate all commits made within a Git repository.
alias cdlogin='f(){ login="$1"; pass="$2"; [ -z "$login" ] && login=xxx; [ -z "$pass" ] && pass=xxx; for ((n=0;n<4;n++)); do adbkey 19 && sleep 0.2; done && adbtext "$login" && adbkey 66 && sleep 1 && adbtext "$pass" && adbkey 66; unset -f f; }; f' |
git config alias.review "\!f() { prnumber=\$1; repo=\$2; [ -z \${repo} ] && repo=base; | |
git fetch \${repo} pull-requests/\${prnumber}/from && git checkout FETCH_HEAD; }; f" |
#!python3 | |
import ctypes | |
import getpass | |
import re | |
from jira import JIRA | |
ctypes.windll.kernel32.SetConsoleTitleW("JIRA subtask closer") |
import androidx.lifecycle.* | |
fun <T> MutableLiveData<T>.setValueIfDiffers(newValue: T?, onSet: ((newValue: T?) -> Unit)? = null, onNotSet: (() -> Unit)? = null) { | |
if (value != newValue) { | |
value = newValue | |
onSet?.invoke(newValue) | |
} else { | |
onNotSet?.invoke() | |
} | |
} |
// ==UserScript== | |
// @name JIRA copy ID and name | |
// @namespace http://tampermonkey.net/ | |
// @version 0.2 | |
// @description try to take over the world! | |
// @author You | |
// @match https://jira.bbqnx.net/browse/* | |
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js | |
// @grant GM_addStyle | |
// ==/UserScript== |
object Scratch { | |
@JvmStatic | |
fun main() { | |
val colorInt = -5327429 | |
val hexColor = colorIntToHex(colorInt) | |
println("$colorInt is $hexColor") | |
} |
const $ = jQuery; | |
zip= rows=>rows[0].map((_,c)=>rows.map(row=>row[c])) | |
console.log([$('td.summary').toArray().reduce((acc, val) => { | |
acc.titles.push($('a.pull-request-title', val)[0].title); | |
acc.times.push($('time', val)[0].title); | |
return acc; | |
}, {titles: [], times: []})].map((result) => zip([result.titles, result.times]))[0] | |
.reduce((acc, val) => { | |
return acc + "\n\n" + val[0] + "\n" + val[1]; | |
}, "")) |
<?php | |
set_time_limit(4); | |
ob_start(); | |
$file = 'logs.txt'; | |
$date_run = date(DATE_ATOM); | |
function shutdown () { | |
global $file; |
var trs = $('.wikitable,.sortable tr').slice(2, -1); | |
trs.toArray().map((el, ind) => { return $('td', el).toArray().map((td, i) => { return td.innerText }) }) |