Skip to content

Instantly share code, notes, and snippets.

//a tag 'title' with him body. Even with newlines
<title>[A-Z0-9\ \_\/\(\)\-\,\.\’\'\?\:\&\;\n\«\"\!\»\‘\%\“\”\[\]àèìòùéö#ä]*</title>\n
@toto-castaldi
toto-castaldi / linux.notes.txt
Last active March 13, 2017 15:20
linux.notes.txt
//WICH VIDEO DRIVER I'M USING
> sudo lshw -c video
//WICH KERNEL I'M USING
> uname -r
> uname -a
//SED
> sed -i 's/8080/8181/g' /apache-tomcat-7.0.39/conf/server.xml
//guava
import com.google.common.collect.ImmutableMap
return new ImmutableMap.Builder<String, Integer>()
.put("one", 1)
.put("two", 2)
.put("three", 3)
.build();
import java.util.Collections;
Collections.<String,String>emptyMap();
//junit<->junit<->4.12
//org.hamcrest<->hamcrest-all<->1.3
import static org.junit.internal.matchers.StringContains.*;
import static org.junit.Assert.*;
assertThat("ABC", containsString("B"));
import static org.junit.internal.matchers.IsCollectionContaining.*;
import static org.hamcrest.core.IsEqual.*;
import static org.junit.Assert.*;
//clean all
docker rm $(docker ps -a -q)
docker rmi $(docker images -q)
sudo service docker stop
sudo rm -rf /var/lib/docker/*
sudo service docker start
//
sudo docker exec -i -t [NAME/ID] /bin/bash
<html>
<head>
<title>AAA</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha512-dTfge/zgoMYpP7QbHy4gWMEGsbsdZeCXz7irItjcC3sPUFtf0kuFbDz/ixG7ArTxmDjLXDmezHubeNikyKGVyQ==" crossorigin="anonymous">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap-theme.min.css" integrity="sha384-aUGj/X2zp5rLCbBxumKTCw2Z50WgIr1vs/PFN4praOTvYXWlVyh2UtNUU0KAUhAX" crossorigin="anonymous">
<style>
.glyphicon-refresh-animate {
-animation: spin .7s infinite linear;
-ms-animation: spin .7s infinite linear;
-webkit-animation: spinw .7s infinite linear;
@toto-castaldi
toto-castaldi / 3d-mesh-scaling-with-tween.html
Last active October 23, 2020 20:53
three.js mesh sphere scaling with Tweens
<body></body>
<script src="http://gamingJS.com/Three.js"></script>
<script src="http://gamingJS.com/ChromeFixes.js"></script>
<script src="http://gamingJS.com/Tween.js"></script>
<script>
var scene = new THREE.Scene();
var width = window.innerWidth - 20;
var height = window.innerHeight - 20;
@toto-castaldi
toto-castaldi / 3d-mesh-scaling-with-sin.html
Last active October 13, 2015 21:52
three.js mesh sphere scaling with a Math.sin
<body></body>
<script src="http://gamingJS.com/Three.js"></script>
<script src="http://gamingJS.com/ChromeFixes.js"></script>
<script src="http://gamingJS.com/Tween.js"></script>
<script>
var scene = new THREE.Scene();
var width = window.innerWidth - 20;
var height = window.innerHeight - 20;