old stuff added

This commit is contained in:
root 2021-06-24 13:04:26 +02:00
parent 3236fa4423
commit f89109c225
35 changed files with 864 additions and 0 deletions

14
old/browser/browser-matrix.min.js vendored Normal file

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,94 @@
"use strict";
var stringToColour = function(str) {
var hash = 0;
for (var i = 0; i < str.length; i++) {
hash = str.charCodeAt(i) + ((hash << 5) - hash);
}
var colour = '#';
for (var i = 0; i < 3; i++) {
var value = (hash >> (i * 8)) & 0xFF;
colour += ('00' + value.toString(16)).substr(-2);
}
return colour;
}
console.log("Loading browser sdk");
var client = new matrixcs.createClient( "https://gnuragist.es:8448" );
client.setGuest(true);
var room=null;
console.log( client.getRooms() );
client.registerGuest().then( function(a) {
console.log(a);
client=new matrixcs.createClient( { user_id: a.user_id, userId: a.user_id, access_token: a.access_token, accessToken: a.access_token, baseUrl: "https://gnuragist.es:8448" } );
console.log(a);
//});
client.on("RoomMember.membership", function(event, member) {
if (member.membership === "invite" && member.userId === client.getUserId()) {
client.joinRoom(member.roomId).done(function() {
console.log("Auto-joined %s", member.roomId);
room=member.roomId;
});
}
});
client.on("Room.timeline", function(event, room, toStartOfTimeline) {
if (toStartOfTimeline) {
return; // don't print paginated results
}
if (event.getType() !== "m.room.message") {
return; // only print messages
}
console.log(
// the room name will update with m.room.name events automatically
"(%s) %s :: %s", room.name, event.getSender(), event.getContent().body
);
a=document.querySelector('#textOut');
a.insertAdjacentHTML('beforeend',"<p class='triangle-isosceles' style='background:"+ stringToColour(event.getSender()) +"' > " + event.getContent().body + "</p>");
window.scrollTo(0,document.body.scrollHeight);
});
//B
client.startClient();
client.joinRoom("#zebras:gnuragist.es");
var room = client.getRooms()[0]
console.log(room);
var roomid = room.roomId;
client.sendTextMessage(roomid," somebody around!");
} )
window.onload = function (){
var textmessage="";
document.querySelector('#myDiv').addEventListener('keyup', function (e) {
if(e.keyCode==13) {
var r = client.getRooms();
console.log( r.roomId, textmessage);
client.sendTextMessage( r[r.length-1].roomId, textmessage );
textmessage = "";
} else {
textmessage += e.key;
}
});
} //wndow.onload
/*
client.on("event", function(event) {
console.log( "%s - %s :: %s", event.getType(), event.getSender(), event.getContent()
);
console.log(event);
});
*/

16
old/browser/index.html Normal file
View File

@ -0,0 +1,16 @@
<html>
<head>
<title>Test</title>
<script src="browser-matrix.min.js"></script>
<script src="browserTest.js"></script>
<body>
<div id="myDiv" contenteditable>
Sanity Testing (check the console) : This example is here to make sure that
the SDK works inside a browser. It simply does a GET /publicRooms on
matrix.org
<br/>
You should see a message confirming that the SDK works below:
<br/>
</div>
</body>
</html>

109
old/chat.css Normal file
View File

@ -0,0 +1,109 @@
@font-face {
font-family: 'OpenDyslexic';
src: url('./fonts/OpenDyslexic-Regular.eot');
src: url('./fonts/OpenDyslexic-Regular.woff') format('woff'),
url('./fonts/OpenDyslexic-Regular.ttf') format('truetype'),
url('./fonts/OpenDyslexic-Regular.svg') format('svg');
font-weight: normal;
font-style: normal;
}
body {
background-color: black;
font-family: OpenDyslexic;
}
h1 {
color: black;
font-size: 4vw;
width: auto;
text-align: center;
margin: 0;
}
.exit {
margin-top: -6vw;
margin-left: 66vw;
font-size: 3vw;
color: red;
}
a {
text-decoration: none;
outline: 0;
}
textarea {
font-family: inherit;
margin-left: 21vw;
}
.js {
color: rgb(77, 77, 77);
font-family: inherit;
margin-top: 2vw;
margin-left: 2vw;
}
/* Bubble with an isoceles triangle
------------------------------------------ */
.triangle-isosceles {
position: relative;
padding: 15px;
margin: 1em 0 3em;
color: #000;
background: #f3961c;
border-radius: 10px;
/* background: linear-gradient(top, #f9d835, #f3961c); */
}
/* Variant : for left/right positioned triangle
------------------------------------------ */
.triangle-isosceles.left {
margin-left:150px;
background:#f3961c;
}
/* Variant : for right positioned triangle
------------------------------------------ */
.triangle-isosceles.right {
margin-right:150px;
background:#4a0caf;
}
/* creates triangle */
.triangle-isosceles:after {
content: "";
display: block; /* reduce the damage in FF3.0 */
position: absolute;
bottom: -15px;
left: 50px;
width: 0;
border-width: 15px 15px 0;
border-style: solid;
border-color: grey transparent;
}
/* Variant : left
------------------------------------------ */
.triangle-isosceles.left:after {
top:16px; /* controls vertical position */
left:-50px; /* value = - border-left-width - border-right-width */
bottom:auto;
border-width:10px 50px 10px 0;
border-color:white #f3961c;
}
/* Variant : right
------------------------------------------ */
.triangle-isosceles.right:after {
top:16px; /* controls vertical position */
right:-50px; /* value = - border-left-width - border-right-width */
bottom:auto;
left:auto;
border-width:10px 0 10px 50px;
border-color:white #4a0caf;
}

24
old/chat.html Normal file
View File

@ -0,0 +1,24 @@
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="chat.css">
<script src="./browser/browser-matrix.min.js"></script>
<script src="./browser/browserTest.js"></script>
<title>el chat</title>
<body id="myDiv" >
<h1>GNUragistes!</h1>
<div class="exit"> <a href="index.html">[exit]</a></div>
<div style=" position: relative; padding: 15px; margin: 1em 0 3em; color: #000; border-radius: 10px; background: white;" contenteditable="true"> </div>
<div class="js" id="textOut"></div>
</body>
</html>

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

90
old/index.css Normal file
View File

@ -0,0 +1,90 @@
/** @format */
@font-face {
font-family: "OpenDyslexic";
src: url("./fonts/OpenDyslexic-Regular.eot");
src: url("./fonts/OpenDyslexic-Regular.woff") format("woff"),
url("./fonts/OpenDyslexic-Regular.ttf") format("truetype"),
url("./fonts/OpenDyslexic-Regular.svg") format("svg");
font-weight: normal;
font-style: normal;
}
body {
background-color: black;
font-family: OpenDyslexic;
display: grid;
grid-template-columns: 1fr 2fr 1fr 1fr;
/* grid-auto-rows: auto; */
grid-template-rows: min(50px, min-content);
grid-gap: 30px;
font-size: 15pt;
color: white;
}
h1 {
font-size: 4vw;
width: auto;
text-align: center;
margin: 0;
padding-bottom: -0.5vw;
}
.chat {
font-size: 3vw;
color: red;
grid-column: 4;
grid-row: 1;
}
a {
text-decoration: none;
outline: 0;
}
.fr {
border: 0.2vw solid grey;
grid-column: 3;
grid-row: 2;
}
.sb {
grid-column: 3;
grid-row: 5;
}
.big {
width: 100%;
height: 100%;
border: 0.2vw solid grey;
padding-left: 0.5vw;
grid-column: 2;
grid-row: 3;
}
.sa {
grid-column: 3;
grid-row: 4;
}
p {
color: rgb(177, 177, 177);
}
img {
grid-column: 2;
grid-row: 4;
}
.poeme {
float: left;
}

88
old/index.html Normal file
View File

@ -0,0 +1,88 @@
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="index.css">
<title>gnuragist.es</title>
<body>
<h1>GNUragistes!</h1>
<p class="fr">Support Gnu/Linux - Réanimistes d'ordinateurs libres</p>
<div class="big">
<p>
Un soucis, des questions, besoin daide avec votre <b>GNU/Linux</b> ? Nous pouvons vous aider vous ou votre association.
Mises à jour, sauvegardes, imprimantes, carte didentité électronique, installation de votre serveur personnel ou
associatif sur base de Yunohost (Mail, Nextcloud, Agendas, Contacts, Dokuwiki, …)
</p>
<p>
<b>Devenez membres à prix libre.</b>
</p>
<p> Versement mensuel souhaité.</p>
</div>
<div class="sa">
Au Hacklab <br/>
Avenue Princesse Elisabeth 46 <br/>
1030 Schaerbeek <br/>
<br/>
IBAN: BE63 5230 8118 2308<br/>
BIC: TRIOBEBB<br/>
<br/>
C'est maGNUfique! <br/>
<div>
<p>
gnuragist.es,
les gentil·le·s desrangé·e·s,
enragé·e·s du logiciel Libre,
dédient quelques moments
</p>
<p>
à vous pointer
sur les dangers
des mafias gafam,
</p>
<p>
à prendre des résolutions,
à chercher des vraies solutions,
en plus, sans trop dépenser.
</p>
<p>
juste de questionner,
pourquoi autant de fortuné·e·s,
sollicitent avec passion,
votre temps et vos données.
</p>
</div>
</div>
<div class="sb">
En semaine, la
journée, le soir ou le
week-end
</div>
<p>help@gnuragist.es - 0466/47.25.33</p>
<!-- chat needs matrix guest accounts on local server... needs a patch & find out what is happening ...
https://git.gnuragist.es/git/zebras/organisation/issues/14
<a href="chat.html">
<div class="chat">[chat]</div>
</a>
-->
<img src="./map.png" width="100%" />
</body>
</html>

BIN
old/map.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 246 KiB

14
older/browser/browser-matrix.min.js vendored Normal file

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,78 @@
"use strict";
console.log("Loading browser sdk");
var client = new matrixcs.createClient( "https://gnuragist.es:8448" );
client.setGuest(true);
var room=null;
console.log( client.getRooms() );
client.registerGuest().then( function(a) {
console.log(a);
client=new matrixcs.createClient( { user_id: a.user_id, userId: a.user_id, access_token: a.access_token, accessToken: a.access_token, baseUrl: "https://gnuragist.es:8448" } );
console.log(a);
//});
client.on("RoomMember.membership", function(event, member) {
if (member.membership === "invite" && member.userId === client.getUserId()) {
client.joinRoom(member.roomId).done(function() {
console.log("Auto-joined %s", member.roomId);
room=member.roomId;
});
}
});
client.on("Room.timeline", function(event, room, toStartOfTimeline) {
if (toStartOfTimeline) {
return; // don't print paginated results
}
if (event.getType() !== "m.room.message") {
return; // only print messages
}
console.log(
// the room name will update with m.room.name events automatically
"(%s) %s :: %s", room.name, event.getSender(), event.getContent().body
);
a=document.querySelector('#textOut');
a.insertAdjacentHTML('beforeend',event.getContent().body);
a.insertAdjacentHTML('beforeend',"<br>");
});
//B
client.startClient();
client.joinRoom("#zebras:gnuragist.es");
var room = client.getRooms()[0]
console.log(room);
var roomid = room.roomId;
client.sendTextMessage(roomid," somebody around!");
} )
window.onload = function (){
var textmessage="";
document.querySelector('#myDiv').addEventListener('keyup', function (e) {
if(e.keyCode==13) {
var r = client.getRooms();
console.log( r.roomId, textmessage);
client.sendTextMessage( r[r.length-1].roomId, textmessage );
textmessage = "";
} else {
textmessage += e.key;
}
});
} //wndow.onload
/*
client.on("event", function(event) {
console.log( "%s - %s :: %s", event.getType(), event.getSender(), event.getContent()
);
console.log(event);
});
*/

16
older/browser/index.html Normal file
View File

@ -0,0 +1,16 @@
<html>
<head>
<title>Test</title>
<script src="browser-matrix.min.js"></script>
<script src="browserTest.js"></script>
<body>
<div id="myDiv" contenteditable>
Sanity Testing (check the console) : This example is here to make sure that
the SDK works inside a browser. It simply does a GET /publicRooms on
matrix.org
<br/>
You should see a message confirming that the SDK works below:
<br/>
</div>
</body>
</html>

42
older/chat.css Normal file
View File

@ -0,0 +1,42 @@
@font-face {
font-family: 'OpenDyslexic';
src: url('./fonts/OpenDyslexic-Regular.eot');
src: url('./fonts/OpenDyslexic-Regular.woff') format('woff'),
url('./fonts/OpenDyslexic-Regular.ttf') format('truetype'),
url('./fonts/OpenDyslexic-Regular.svg') format('svg');
font-weight: normal;
font-style: normal;
}
body {
background-color: black;
font-family: OpenDyslexic;
}
h1 {
color: black;
font-size: 4vw;
width: auto;
text-align: center;
margin: 0;
}
.exit {
margin-top: -6vw;
margin-left: 66vw;
font-size: 3vw;
color: red;
}
a {
text-decoration: none;
outline: 0;
}
textarea {
font-family: inherit;
margin-left: 21vw;
}
.js {
color: rgb(77, 77, 77);
font-family: inherit;
margin-top: 2vw;
margin-left: 2vw;
}

25
older/chat.html Normal file
View File

@ -0,0 +1,25 @@
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="chat.css">
<script src="./browser/browser-matrix.min.js"></script>
<script src="./browser/browserTest.js"></script>
<title>el chat</title>
<body id="myDiv">
<h1>GNUragistes!</h1>
<a href="index.html">
<div class="exit">[exit]</div>
</a>
<div class="js" id="textOut"></div>
</body>
</html>

BIN
older/flyer1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 285 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

7
older/ici/.htaccess Normal file
View File

@ -0,0 +1,7 @@
AuthUserFile /var/www/my_webapp/www/ici/.htpasswd
AuthGroupFile /var/www/my_webapp/www/ici/.htgroup
AuthName "Documents administratifs"
AuthType Basic
require group Membres Admin

2
older/ici/.htgroup Normal file
View File

@ -0,0 +1,2 @@
Membres:kyle davin noemie
Admin:afsanat noemie

4
older/ici/.htpasswd Normal file
View File

@ -0,0 +1,4 @@
afsanat:$apr1$TVFhC/..$rRph2WN9n1DeW6Cs89So2.
noemie:$apr1$vAVyg…$HXoAN3bh.Ff6hxXKopIFpE1
kyle:$apr1$7ALHn/..$aV8IuW3jqdQWaStyX2Izg.
davin:$apr1$2o89Z/..$SVDHl7FK4A0w8le.cq1Z1

2
older/ici/readme.txt Normal file
View File

@ -0,0 +1,2 @@
test

86
older/index.css Normal file
View File

@ -0,0 +1,86 @@
/** @format */
@font-face {
font-family: "OpenDyslexic";
src: url("./fonts/OpenDyslexic-Regular.eot");
src: url("./fonts/OpenDyslexic-Regular.woff") format("woff"),
url("./fonts/OpenDyslexic-Regular.ttf") format("truetype"),
url("./fonts/OpenDyslexic-Regular.svg") format("svg");
font-weight: normal;
font-style: normal;
}
body {
background-color: black;
font-family: OpenDyslexic;
display: grid;
grid-template-columns: 1fr 2fr 1fr 1fr;
/* grid-auto-rows: auto; */
grid-template-rows: min(50px, min-content);
grid-gap: 30px;
font-size: 15pt;
color: white;
}
h1 {
font-size: 4vw;
width: auto;
text-align: center;
margin: 0;
padding-bottom: -0.5vw;
}
.chat {
font-size: 3vw;
color: red;
grid-column: 4;
grid-row: 1;
}
a {
text-decoration: none;
outline: 0;
}
.fr {
border: 0.2vw solid grey;
grid-column: 3;
grid-row: 2;
}
.sb {
grid-column: 3;
grid-row: 5;
}
.big {
width: 100%;
height: 100%;
border: 0.2vw solid grey;
padding-left: 0.5vw;
grid-column: 2;
grid-row: 3;
}
.sa {
grid-column: 3;
grid-row: 4;
}
p {
color: rgb(177, 177, 177);
}
img {
grid-column: 2;
grid-row: 4;
}

54
older/index.html Normal file
View File

@ -0,0 +1,54 @@
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="index.css">
<title>gnuragist.es</title>
<body>
<h1>GNUragistes!</h1>
<p class="fr">Support Gnu/Linux - Réanimistes d'ordinateurs libres</p>
<div class="big">
<p>
Un soucis, des questions, besoin daide avec votre <b>GNU/Linux</b> ? Nous pouvons vous aider vous ou votre association.
Mises à jour, sauvegardes, imprimantes, carte didentité électronique, installation de votre serveur personnel ou
associatif sur base de Yunohost (Mail, Nextcloud, Agendas, Contacts, Dokuwiki, …)
</p>
<p>
<b>Devenez membres à prix libre.</b>
</p>
<p> Versement mensuel souhaité.</p>
</div>
<div class="sa">
Au Hacklab <br/>
Avenue Princesse Elisabeth 46 <br/>
1030 Schaerbeek <br/>
<br/>
C'est maGNUfique! <br/>
</div>
<div class="sb">
En semaine, la
journée, le soir ou le
week-end
</div>
<p>help@gnuragist.es - 0466/47.25.33</p>
<a href="chat.html">
<div class="chat">[chat]</div>
</a>
<img src="./map.png" width="100%" />
</body>
</html>

17
older/index.html.old Executable file
View File

@ -0,0 +1,17 @@
<!DOCTYPE html>
<html>
<body>
<h1>GNUragist.es!</h1>
<p>ici prochainement un site.</p>
<p>
av. princesse elisabeth 46 - 1030 schaarbeek
</p>
<br>
</body>
</html>

33
older/index.html.ori Normal file
View File

@ -0,0 +1,33 @@
<!DOCTYPE html>
<html>
<head>
<title>Custom Web App</title>
</head>
<body>
<h1>It works!</h1>
<p>Congratulation, you have just installed your custom web app.</p>
<h2>Access your site</h2>
<p>
You can access to your site - e.g. to put content, change this wonderful
page - using SFTP. You can use a client application for that such as
<a href="https://filezilla-project.org/download.php?type=client" target="_blank">FileZilla</a>.
Here are the SFTP connection details:
</p>
<dl>
<dt>Domain</dt>
<dd>gnuragist.es</dd>
<dt>Port</dt>
<dd>22 (or the port you defined <a href="https://yunohost.org/#/security_fr">if you change the ssh port</a>)</dd>
<dt>User</dt>
<dd>webapp1</dd>
<dt>Password</dt>
<dd><i>the one you set at installation</i></dd>
</dl>
<hr/>
<p>As a reward, here is a random cat picture:</p>
<img src="https://thecatapi.com/api/images/get?format=src&type=gif">
</body>
</html>

11
older/indexos.html Normal file
View File

@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="test.css">
<title>gnuragist.es</title>
</head>
<body>
<img src="flyer1.png" alt=""class="invert">
</body>
</html>

BIN
older/map.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 246 KiB

0
older/test Normal file
View File

11
older/testos.css Normal file
View File

@ -0,0 +1,11 @@
body {
background-color: black;
filter: invert(100%);
}
img {
width: auto;
height: 97vh;
display:block;
margin-left:auto;
margin-right:auto;
}

27
remote.pub Normal file
View File

@ -0,0 +1,27 @@
-----BEGIN RSA PRIVATE KEY-----
MIIEowIBAAKCAQEA4p33mbdc3/Et1kqPVEV728bnGlEwhc9klz5R/9ZzOpSMnxv+
MEiBUh5/TLIgKjefGS5ZNEge7kx2hhEQdc2grPLqxyNHqUo1jQivxdxw2ogYIJ8g
yvt3oB3IHRnlJjc6wtis6b+luz3q0IJIrsyU3gHckOFUHmuP3kRWp7F3urjOKdxi
rkTAQqNeMvSgx67meBTu5CtCNNOUPq2oknFF/UGCf3YCAkDokEy85a4C879cB/hw
AYCnjaZ34sP6oViedm6RCG7qTAJ6hsDajqLyaTrBkzDtJYa9n3hPfrmptvjKbNGm
wgjASPaKvJQICX2AWBY21CI2mwKJvIKdIL0D2wIDAQABAoIBACAGzy1MOrXzcdTt
KKBySXTgAV04yDDBBKhTSGdtuU84Gz+JRz0vogcnBDqkmeMdhUCbykOXRbfL2pxL
4RWk/+YxVnjaRZBpSnQqHB1McC6SOUay9oF5VIiubM+gD0B9YbKTyKwoR5XUxFC/
eOIrS4asoK1hCvBZpzV0VwLQE+mxXGBJYv0xx85y6oQjB6jJ83ZS1b+jBUl7ZKhz
9xmLrbaKnRFFId1xCDhjeEPHFeFDTa5H7DZGbIrCSFiG7Nj+N+mvxTuFhEoCDt6v
bp5Z120IRV4Zhl1jvWJhyOgPcDEFvzJBZNbLOTyYD3aji2TGiiSNX0tx+MdkYOMX
ee+lKIECgYEA+j+a9aYlPy6CFnWk6ZLIZLJMunvLO5MRDvyOpdzVpyCgQN+943UB
1mnQXQfxiYFCw5lJQsIGe184VG7Q07wcRNDDI5FilvFbShcDRPO7FYpnDzweCiKB
l6ppf7WaQDxngUrWrZmLo4xuJYuH7boNXQarFg54hVKpesBDjgJ6xbsCgYEA59NS
MhZrUflazLaUbxJchaJzPOhhqKSBSWUKZ1T1I4bh1XHjCk20jKqAjsObXxG28dS9
z+4y1topSOj/OF23RF37D2YOfJsZe7TxPB0FcYxp0zilMvnlZXhetd0f2OjoSi7Y
Hen3OWBYhYLHKw0atJ43HTYtXMcSdW7i4SZayGECgYEAjRdLcPCJ04OPSMZvglmF
rnBwnjuprB8Q4Rg3/P/zXdUhRTJgx1ty+8aQ+cK+xb4hPFKyYXcvXGOlSMVp69cF
QS9KtkUEBwJxa+Zpq3iXpF9yF77XWPN3iWFFNgHXxBvKZ7UgMKR/fGhyuaxfqQLb
AfX+g+MIxHKEp3a7H9f6DH0CgYAbxJox2bGdLgsMPkplS4O9lgnLn+IiuyGpUur+
GZULXlqqoGubjlc0CjA/6Xow1wRczyi1QUjhp1wOmaoIbGFJVSB/ZbASiNlykefb
VXaTdUgvvrc69efeUZ62lff8mVlJmXbVjnLIcpvn0hRdOcKbI+BiJV0locq6Oj/+
zANPwQKBgESbqq6QqQfqkmm2L9kViUVZDJ83jpTSzcHhs8/QmvbhVhQij/32jleV
/+58KMtwJzzZJdcN9Bd9rNC2h7/t9+1j0r5q7QyEfOPzdwgDQlHYBilLbG5JMvtE
c5S1/tmzci/VOUvs1v+tPXhbF75A9IDhjj8gFEt6AR2PI9uw8rgs
-----END RSA PRIVATE KEY-----