Skip to content

Instantly share code, notes, and snippets.

@lduboeuf
lduboeuf / creer_auto.html
Created June 7, 2017 14:47
creation par js d'elements html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>creation de balise p par programmation</title>
<style media="screen">
p {
background-color: green;
}
@lduboeuf
lduboeuf / todo-app-init.html
Created June 12, 2017 08:07
todo app starter
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>TODO app</title>
<style media="screen">
li.done{
text-decoration: line-through;
}
</style>
@lduboeuf
lduboeuf / tp2.java
Created September 5, 2017 13:19
algo, conversion celcius, degré
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package com.ldub.testouille;
import java.util.Scanner;
@lduboeuf
lduboeuf / Gereville.java
Created September 12, 2017 09:29
Gereville v1
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package com.ldub.gereville;
/**
*
* @author lionel
@lduboeuf
lduboeuf / date_test
Created September 28, 2017 08:50
tests date
//convertir une date exprimée en chaine de caractère en java.util.date:
DateFormat df = new SimpleDateFormat("MM/dd/yyyy");
Date datedeb = df.parse("02/01/2017");
Date datefin = df.parse("09/11/2017");
//afficher une date suivant le modèle mm/dd/yyyy
String dt1 = df.format(datedeb);
System.out.println(dt1);
@lduboeuf
lduboeuf / mircast.sh
Created December 6, 2017 09:54
screen casting UT device
#!/bin/bash
SCREEN_WIDTH=384
SCREEN_HEIGHT=640
PORT=1234
FORMAT=rgba
if [[ $# -eq 0 ]] ; then
echo 'usage: ./mircast UT_IP_ADDRESS , e.g: ./mircast 192.168.1.68'
exit 1
#on device
weston --backend=rdp-backend.so --rdp-tls-cert=/home/ldub/c
erts/oneplus2.crt --rdp-tls-key=/home/ldub/certs/oneplus2.key --socket=wayland-1
#on computer
xfreerdp /v:172.16.42.1 /sec:tls /size:50%
@lduboeuf
lduboeuf / activity.java
Created June 20, 2018 20:07
android animation infinite loop
final ImageView animationView = (ImageView) findViewById(R.id.animationView);
final AnimatedVectorDrawableCompat avd = (AnimatedVectorDrawableCompat) animationView.getDrawable();
avd.registerAnimationCallback(new Animatable2Compat.AnimationCallback() {
@Override
public void onAnimationEnd(Drawable drawable) {
animationView.post(new Runnable() {
@Override
public void run() {
avd.start();
@lduboeuf
lduboeuf / Dockerfile
Last active July 6, 2019 12:36
QtCreator in clickable container
FROM clickable/ubuntu-sdk:16.04-amd64
# Install lots of packages
RUN apt-get update && apt-get install -y libxext-dev libxrender-dev libxtst-dev wget
# Download script
RUN wget http://download.qt.io/official_releases/online_installers/qt-unified-linux-x64-online.run
RUN chmod +x ./qt-unified-linux-x64-online.run
# Run installer as entrypoint
@lduboeuf
lduboeuf / Dockerfile
Created July 6, 2019 13:07
QtCreator in clickable container 2
FROM clickable/ubuntu-sdk:16.04-amd64
RUN apt-get update && apt-get install -y git qtcreator libxrender1 gdb
CMD ["/usr/bin/qtcreator"]