Skip to content

Instantly share code, notes, and snippets.

Michel Daviot tyrcho

Block or report user

Report or block tyrcho

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
tyrcho /
Created Aug 26, 2019
Rebase on source branch all open MR for a user in a group
curl \
"$GROUP_ID/merge_requests?state=opened&scope=all&author_id=$AUTHOR_ID" \
| jq -r '.[] | "\(.project_id) \(.iid)"' \
| while read -r projectid mrid; do
curl -X PUT --header "PRIVATE-TOKEN: $GITLAB_PAT" "$projectid/merge_requests/$mrid/rebase"
tyrcho / google.js
Last active Dec 5, 2018
set google domain users as choices in a form
View google.js
// see to activate AdminDirectory
// - resources > advanced google services > Admin Directory API > Activate
// -
function onOpen(e) {
.addItem('Update users', 'setUsers')
tyrcho /
Last active Aug 22, 2019
Git secret and CI
tyrcho / activity.gpi
Last active May 31, 2018
Code Maat (Your Code as a Crime Scene) script
View activity.gpi
set xdata time
set timefmt "%Y-%m-%d"
set datafile separator ","
set format x "%Y-%m-%d"
set terminal png size 768,768 enhanced truecolor font 'Roboto,9'
set xlabel "Date"
set xlabel "LoC"
set pointsize 0.8
set border 11
set xtics out
tyrcho /
Created Apr 19, 2018
free-spacing regex demo in Java
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class DemoFreeSpacingRegex {
public static void main(String[] args) {
String re = "(?x)\n"
+ "# ?x is free-spacing flag to allow #comments, must be right at start of String\n"
+ "(19|20\\d\\d) # year (group 1)\n"
+ "[- /.] # separator\n"
tyrcho / free-spacing-regex.scala
Last active Apr 19, 2018
Free Spacing Demo in Scala (add comments to your Regex)
View free-spacing-regex.scala
val re = """(?x)
# Match a 20th or 21st century date in yyyy-mm-dd format
# ?x is free-spacing flag to allow #comments, must be right at start of String
(19|20)\d\d # year (group 1)
[- /.] # separator
(0[1-9]|1[012]) # month (group 2)
tyrcho /
Last active Sep 7, 2017
My install commands for manjaro
#i3 window manager
sudo -E pacman -S --needed rofi i3-wm i3lock i3blocks i3status-manjaro i3-theme-dark lxappearance-gtk3
#need to run lxapparence afterwards to restore icons
View FreeMonads.scala
import java.sql.{Connection, DriverManager}
object FreeMonads {
def getUserPwd(id: String)(c: Connection): String = {
tyrcho / Units.scala
Created Jul 18, 2017
Scala Units of Measures, using implicits & generics
View Units.scala
// inspired from
// and
// a complete library :
import Distance._
import Time._
trait UnitOfMeasure {
def name: String
tyrcho /
Last active Apr 18, 2017
JIRA JQL tricks

Search for issues

project = Deepsky and "Business Value">0 AND cf[10953]>0 and 
issueFunction in aggregateExpression("bv","BusinessValue.average()","sp","StoryPoints.average()")

Quick filter

 issueFunction in expression("", "BusinessValue / (StoryPoints+0.01) > 5")

To show non resolved task which are likely to slip

You can’t perform that action at this time.