Skip to content

Instantly share code, notes, and snippets.

View madmas's full-sized avatar
🎯
Focusing

Markus Schlichting madmas

🎯
Focusing
View GitHub Profile
2020-08-18 10:51:53.751 25718-25718/de.dev.app D/AndroidRuntime: Shutting down VM
--------- beginning of crash
2020-08-18 10:51:53.752 25718-25718/de.dev.app E/AndroidRuntime: FATAL EXCEPTION: main
Process: de.dev.app, PID: 25718
com.tns.NativeScriptException: Calling js method onTransitionEnd failed
Error: java.lang.NoSuchMethodError: no static method "Landroid/os/Handler;.postDelayed(Ljava/lang/Runnable;J)Z"
at com.tns.Runtime.callJSMethodNative(Native Method)
at com.tns.Runtime.dispatchCallJSMethodNative(Runtime.java:1286)
@madmas
madmas / device.log
Created July 15, 2020 07:07
Stacktrace for NativeScript java.lang.NoSuchMethodError: no static method error
07-14 22:33:12.270 4836 4836 E AndroidRuntime: com.tns.NativeScriptException: Calling js method onStart failed
07-14 22:33:12.270 4836 4836 E AndroidRuntime: Error: java.lang.NoSuchMethodError: no static method "Landroid/view/View;.setPadding(IIII)V"
07-14 22:33:12.270 4836 4836 E AndroidRuntime: at com.tns.Runtime.callJSMethodNative(Native Method)
07-14 22:33:12.270 4836 4836 E AndroidRuntime: at com.tns.Runtime.dispatchCallJSMethodNative(Runtime.java:1286)
07-14 22:33:12.270 4836 4836 E AndroidRuntime: at com.tns.Runtime.callJSMethodImpl(Runtime.java:1173)
07-14 22:33:12.270 4836 4836 E AndroidRuntime: at com.tns.Runtime.callJSMethod(Runtime.java:1160)
07-14 22:33:12.270 4836 4836 E AndroidRuntime: at com.tns.Runtime.callJSMethod(Runtime.java:1138)
07-14 22:33:12.270 4836 4836 E AndroidRuntime: at com.tns.Runtime.callJSMethod(Runtime.java:1134)
07-14 22:33:12.270 4836 4836 E AndroidRuntime: at com.tns.NativeScriptActivity.onStart(NativeScriptActivity.java:29)
07-14 22:33:12.270 483
@madmas
madmas / gist:f5d8b4078f60351c07f3f89de0344462
Created July 26, 2019 07:26
ZSH: Show timestamp of command issued in prompt
# Show timestamp whan a command was issued on the right prompt
RPROMPT='[%D{%f.%m. %H:%M:%S}]'
TMOUT=1
TRAPALRM() {
zle reset-prompt
}
# inspired by https://stackoverflow.com/questions/13125825/zsh-update-prompt-with-current-time-when-a-command-is-started
### Keybase proof
I hereby claim:
* I am madmas on github.
* I am madmas (https://keybase.io/madmas) on keybase.
* I have a public key ASAYc09Ts8YC7hJoDLTCeyudVaHIaAkKWy_eL7o8yoNLZgo
To claim this, I am signing this object:
buildscript {
repositories {
jcenter()
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath 'com.moowork.gradle:gradle-node-plugin:0.13'
@madmas
madmas / build.gradle
Created October 30, 2014 18:06
AsciiDoktor gradle build
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'org.asciidoctor:asciidoctor-gradle-plugin:1.5.0'
}
}
@madmas
madmas / mail.py
Created September 28, 2013 19:30
send a mail (including attachments) with python
import smtplib, os
from email.MIMEMultipart import MIMEMultipart
from email.MIMEBase import MIMEBase
from email.MIMEText import MIMEText
from email.Utils import COMMASPACE, formatdate
from email import Encoders
def send_mail(send_from, send_to, subject, text, files=[], server="localhost"):
assert type(send_to)==list
assert type(files)==list
@madmas
madmas / gist:1226153
Created September 19, 2011 08:37
groovy script: loop through subdirs and write file info to mysql database
#!/usr/bin/env groovy
import groovy.sql.Sql
def sql = Sql.newInstance("jdbc:mysql://localhost/statistics", "user",
"password", "com.mysql.jdbc.Driver")
File f = new File(".");
f.eachDir { dir ->
dir.eachFile { file ->