Skip to content

Instantly share code, notes, and snippets.

View tribbloid's full-sized avatar

Peng Cheng tribbloid

View GitHub Profile
:init
The build file 'build.gradle' already exists. Skipping build initialization.
:init SKIPPED
BUILD SUCCESSFUL
Total time: 8.814 secs
This build could be faster, please consider using the Gradle Daemon: https://docs.gradle.org/2.14/userguide/gradle_daemon.html
peng@peng-tribbloids:~/git-drone/dronekit-android$
@tribbloid
tribbloid / dronekit-mavproxy-test.py
Created December 22, 2016 17:53
Usually commands.download() will fail after 4-6 trials. It won't happen without MAVProxy
import dronekit
import pexpect
import sys
import time
from dronekit_sitl import SITL
sys.path.append('/home/peng/.spookystuff/pythonpath')
import os
sitl_args = ['--model', 'quad', '--home=-35.363261,149.165230,584,353']
@tribbloid
tribbloid / test.py
Created December 22, 2016 18:16
MAVProxy/Dronekit-python integration test on waypoint download
import dronekit
import pexpect
import sys
import time
from dronekit_sitl import SITL
sys.path.append('/home/peng/.spookystuff/pythonpath')
import os
sitl_args = ['--model', 'quad', '--home=-35.363261,149.165230,584,353']
@tribbloid
tribbloid / JCETester.scala
Created January 17, 2018 02:56
Scala JCE Strength tester
import javax.crypto.Cipher;
val maxKeyLen = Cipher.getMaxAllowedKeyLength("AES")
println(maxKeyLen)
@tribbloid
tribbloid / questions.ipynb
Last active April 21, 2018 23:23
2 questions for rigid body dynamics.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@tribbloid
tribbloid / AutoLift.scala
Created February 22, 2024 02:28
SerializingAutoLift & TypeTag in 100 lines, for Scala 3
import java.io.{ByteArrayInputStream, ByteArrayOutputStream, ObjectInputStream, ObjectOutputStream}
import java.util.Base64
import scala.quoted.*
object AutoLift {
trait SerializingAutoLift[T] extends ToExpr[T] {
def apply(x: T)(
using
Quotes