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
package dk.bnr.androidbooking; | |
import android.arch.lifecycle.Lifecycle; | |
import android.support.v7.app.AppCompatActivity; | |
import android.util.Log; | |
import com.uber.autodispose.AutoDispose; | |
import com.uber.autodispose.AutoDisposePlugins; | |
import com.uber.autodispose.android.lifecycle.AndroidLifecycleScopeProvider; |
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
# Get-TodoistBackup.ps1 | |
# Created By: Daniel Smith dan@dansmith65.com | |
# | |
# Download the latest backup from Todoist | |
# | |
# https://gist.github.com/dansmith65/7a753ddb89c9db145d41b0c4b3c7fac0 | |
# https://gist.github.com/arberg/5c905272dd3ba41d767e0907b46cd675 | |
# Powershell Notifications: Install-Module -Name BurntToast | |
$useToast=(Get-Command New-BurntToastNotification -errorAction SilentlyContinue) |
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
#!/bin/bash | |
# | |
# description: Apache Tomcat init script | |
# processname: tomcat | |
# chkconfig: 234 20 80 | |
# | |
# | |
# Copyright (C) 2014 Miglen Evlogiev | |
# | |
# This program is free software: you can redistribute it and/or modify it under |
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
del log\*.log | |
rem Dependent on Hub4Com | |
rem Hub4Com Project page and download | |
rem https://sourceforge.net/projects/com0com/files/hub4com/ | |
rem https://sourceforge.net/p/com0com/news/2012/06/hub4com-v2100-released/ | |
rem Parent com0com project page (unused) | |
rem https://sourceforge.net/projects/com0com/ |
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
#!/bin/bash | |
pid=$$ | |
pgid=$(ps -o pgid= $$ | awk '{$1=$1;print}') | |
# netcat -l 7000 </dev/ttyUSB0 >/dev/ttyUSB0 & | |
cat /dev/ttyUSB0 | tee /var/log/lyngdorfSerial.ComToTcp.log | netcat -l 7000 | tee /var/log/lyngdorfSerial.TcpToCom.log > /dev/ttyUSB0 & | |
# Linux resets state when netcat closes com-port, so we need to se this after opening netcat | |
stty -F /dev/ttyUSB0 115200 cs8 -cstopb -parenb -echo |
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
import ammonite.ops._ | |
import ujson.Js.Value | |
import upickle.default.{macroRW, ReadWriter => RW} | |
//import scala.math.Ordering.Implicits._ | |
//https://transform.now.sh/json-to-scala-case-class | |
case class Da(ext: String, url: String) | |
object Da { // uPickle 0.7.1 needs these to parse the objects. Really ugly, maybe gson is better? | |
implicit val rw: RW[Da] = macroRW |
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
import ammonite.ops._ | |
import ujson.Js.Value | |
import upickle.default.{macroRW, ReadWriter => RW} | |
//import scala.math.Ordering.Implicits._ | |
//https://transform.now.sh/json-to-scala-case-class | |
case class SubLanguage(ext: String, url: String) | |
object SubLanguage { // uPickle 0.7.1 needs these to parse the objects. Really ugly, maybe gson is better? | |
implicit val rw: RW[SubLanguage] = macroRW |
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
# all logging settins are here on top | |
$logFile = "log-$(gc env:computername).log" | |
$logLevel = "DEBUG" # ("DEBUG","INFO","WARN","ERROR","FATAL") | |
$logSize = 1mb # 30kb | |
$logCount = 10 | |
# end of settings | |
function Write-Log-Line ($line) { | |
Add-Content $logFile -Value $Line | |
Write-Host $Line |
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
# all logging settins are here on top | |
$logFile = "log-$(gc env:computername).log" | |
$logLevel = "DEBUG" # ("DEBUG","INFO","WARN","ERROR","FATAL") | |
$logSize = 1mb # 30kb | |
$logCount = 10 | |
# end of settings | |
function Write-Log-Line ($line) { | |
Add-Content $logFile -Value $Line | |
Write-Host $Line |
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 Measure-TMCommand { | |
<# | |
.SYNOPSIS | |
Continually measure a command (or commands) and/or a script (or scripts) up to a user-defined number of repetitions. | |
.DESCRIPTION | |
Continually measure a command (or commands) and/or a script (or scripts) up to a user-defined number of repetitions. As well, the advanced function will calculate averages, can include limited hardware specs about the computer that is performing the measurements, and can even display the output of the commands and/or scripts being measured. | |
.PARAMETER Command |
OlderNewer