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
tyrcho / google.js
Last active Dec 5, 2018
set google domain users as choices in a form
View google.js
// see https://stackoverflow.com/questions/51025018/referenceerror-admindirectory-is-not-defined to activate AdminDirectory
// - resources > advanced google services > Admin Directory API > Activate
// - https://console.cloud.google.com/apis/api/admin.googleapis.com/overview?project=project-id-123456&authuser=1
function onOpen(e) {
FormApp.getUi()
.createAddonMenu()
.addItem('Update users', 'setUsers')
.addToUi();
}
@tyrcho
tyrcho / howto.md
Last active May 10, 2019
Git secret and CI
View howto.md
@tyrcho
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
tyrcho / DemoFreeSpacingRegex.java
Created Apr 19, 2018
free-spacing regex demo in Java
View DemoFreeSpacingRegex.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
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
tyrcho / install.sh
Last active Sep 7, 2017
My install commands for manjaro
View install.sh
#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}
import scala.io.StdIn._
object FreeMonads {
def getUserPwd(id: String)(c: Connection): String = {
""
}
@tyrcho
tyrcho / Units.scala
Created Jul 18, 2017
Scala Units of Measures, using implicits & generics
View Units.scala
// inspired from http://bentrengrove.com/blog/2017/5/21/fun-with-types-extensions-and-generics-in-kotlin
// and http://javanut.net/2017/05/23/more-fun-with-generics-in-kotlin/
// a complete library : http://www.squants.com/
import Distance._
import Time._
trait UnitOfMeasure {
def name: String
@tyrcho
tyrcho / README.md
Last active Apr 18, 2017
JIRA JQL tricks
View README.md

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

View fiddle.html
<input type="submit" onClick="plusOne()" value="+1"/>
<input type="submit" onClick="minusOne()" value="-1"/>
<input type="submit" onClick="reset()" value="reset"/>
<table width="200" border="0" align="center">
<tbody style="display:flex"><tr>
<td><img src="on.png" name="C1" width="50" height="50" id="C1" alt=""></td>
<td><img src="on.png" name="C2" width="50" height="50" id="C2" alt=""></td>
<td><img src="on.png" name="C3" width="50" height="50" id="C3" alt=""></td>
<td><img src="off.png" name="C4" width="50" height="50" id="C4" alt=""></td>
</tr>
You can’t perform that action at this time.