Skip to content

Instantly share code, notes, and snippets.

Avatar

Clement Levallois seinecle

View GitHub Profile
@seinecle
seinecle / google-slides-java-api-example.java
Created Feb 25, 2019
How to create and edit a Google Slide via the Java API client
View google-slides-java-api-example.java
// login and credentials steps are skipped
// because it is such a mess
// I found no example anywhere of how to build and edit a new Google Slides presentation via the Java API client.
// So here you go: how to create two empty slides.
Presentation prezTemp = new Presentation();
prezTemp.setTitle("test_" + String.valueOf(Math.random()));
@seinecle
seinecle / TrollTwitterIdentifier.java
Created Feb 10, 2019
A simple script to identify an extended group of trolling accounts on Twitter, based on tweet posted by several accounts
View TrollTwitterIdentifier.java
/*
* 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 net.clementlevallois.queriestwitterdata.controller;
import Twitter.MyOwnTwitterFactory;
import com.google.common.collect.HashMultiset;
import com.google.common.collect.Multiset;
@seinecle
seinecle / ServerSecurization.java
Last active Feb 26, 2021
Secure your bare metal servers in 1 minute from your local Windows machine. Just needs a private / pub key ready. Tested on Debian for Hetzner servers.
View ServerSecurization.java
/*
* 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 net.clementlevallois.sshautomator.serversecurization;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
@seinecle
seinecle / personalisation.adoc
Last active Apr 23, 2018
Trying to get the index to populate with the Asciidoctor Maven plugin
View personalisation.adoc

Personalization and value creation

last modified: 2021-03-01

@seinecle
seinecle / Form1.java
Created Mar 4, 2018
3 MultiButtons not fully visible
View Form1.java
package net.clementlevallois.net.cookieclicker.ultimate;
import com.codename1.charts.util.ColorUtil;
import com.codename1.components.MultiButton;
import com.codename1.components.ScaleImageButton;
import com.codename1.ui.Component;
import com.codename1.ui.Container;
import com.codename1.ui.Font;
import com.codename1.ui.Image;
import com.codename1.ui.Label;
View gist:06bde086330264b9681d2e721d0ed19e
upstream glassfish_server {
server 127.0.0.1:8080 fail_timeout=0;
}
server {
listen 80;
server_name berat.com;
return 301 https://$server_name$request_uri;
}
server {