Skip to content

Instantly share code, notes, and snippets.

View seysn's full-sized avatar
🦀
Pipo

Nicolas Seys seysn

🦀
Pipo
View GitHub Profile
cat << EOF > /etc/initramfs-tools/hooks/tpm2-decryptkey
#!/bin/sh
PREREQ=""
prereqs()
{
echo ""
}
case \$1 in
prereqs)
prereqs
#!/bin/sh
if [ -f ".tpm2-getkey.tmp" ]; then
# tmp file exists, meaning we tried the TPM this boot, but it didn’t work for the drive and this must be the second
# or later pass for the drive. Either the TPM is failed/missing, or has the wrong key stored in it.
/lib/cryptsetup/askpass "Automatic disk unlock via TPM failed for () Enter passphrase: "
exit
fi
# No tmp, so it is the first time trying the script. Create a tmp file and try the TPM
touch .tpm2-getkey.tmp
N4IgzghgbgpgajATmAlgewHYgFwEYCsANCIjGGgK6IDGZOA2qBhALYw4jUQAuGKADiGJQIAGwrtsAZgAcANgUAWAHS4ADGqmKpAdnwapxChlFpqAaxgATHN0QTiKMAAkUVqzCzYAZmLAwAX0ImVkkQAHc0NBthMQkcACZFHR0FZTkpAE41fD1NIhBjUwtrW3sYRxc3Dy9fUX8gkLYOFhQMJD8hEBFxSQSpXBltVXUMnTVcBL0jEzNLG2w7BxAnV3dPHDqG4JBmZuxONDEunvjsOVTM5TUdGTUEzQnJgqK50sXyyrWazb9Anb2YRQiEwJziknUUjkuHSCSminwcnk+BkOhmxXmZWWq2qGx8f0au1CHG4KG4ED4FBYYN6OHUCWUWiSMkRGk0ikG6LeCyWFRWVXWtQJAOJBwA5mhRDFuuCcFIEvhlAk7ooZPJMhrFDcuSUeZ9+d88Vt/k0wmgUKIaWcdAMYWo5HDMsqNZodZiPtiBT98fUTUT9oVEBSUFSrZI1G73savrihb7CYCOMY0AAjcltEPU2K07ARwqzXW/X0xwVF7amjgU0ksHjcJBhnB516Fn3+Eve40J0UgGsYfhocL17NnLKIpWKDWTqeZF4F9289tG4UVg5gagoTy0BvYGSZRQc5RDWcY94Lg2xst+xMHagUUTcKjsYd9HS4GEJOT5FIfwaGfMnvVPUNONy39MJfDJAALbcnTUQ85BdOR8A1LIkkjQC+RxUtWyvbtzDJOsMDAbcZFwdCsUwr0l3jEUAwALxgFMg2I59G3InDFxA3CAzAckaEgiBEG4bcBgSdizywjtlzAkkYBYfsg1EAAxcQAA8RLZcT9Uk6jQOvEAxW8Ux+BYmUcybOcoz+TjLy7AMBLASCgzrUzTnDdjo3PbDO1o8CqFc2UdwGKRlEUBV8C0G17TQ/9uQomycLsoEoDQRAAE9t2QnRlUPDkJwQ/pZGPOKPUo4DbN8jgwH4FAt1YvBcD0GEJzUTIpHwRQkJRYqWwkqiuKSpM+GoVKiO
@seysn
seysn / a.sh
Last active January 17, 2019 15:22
# 172.28.100.31 node-master
# 172.28.100.28 node-1
# 172.28.100.91 node-2
# 172.28.100.19 node-3
sudo apt update && sudo apt install openjdk-8-jre-headless openjdk-8-jdk-headless
echo "JAVA_HOME=\"/usr/lib/jvm/java-1.8.0-openjdk-amd64\"" | sudo tee -a /etc/environment
wget http://apache.mirrors.spacedump.net/hadoop/common/stable/hadoop-2.9.2.tar.gz
tar xvf hadoop-2.9.2.tar.gz
//
// $GOPATH/src/golang.org/x/crypto/ssh/transport.go
//
// Read version string as specified by RFC 4253, section 4.2.
func readVersion(r io.Reader) ([]byte, error) {
// Empty Read buffer
var buf [1]byte
for length := 0; length < maxVersionStringBytes; length++ {
_, err := io.ReadFull(r, buf[:])
@seysn
seysn / rsx.md
Created November 20, 2018 10:46

if vlan 15 doesn't exists in db

SV3# sh run
... // Pas de vlan 15
SV3# vlan database
SV3# vlan 15
SV3# vtp transparent
SV3# apply
Vlan added !!!!!
@seysn
seysn / Bully.java
Created October 8, 2018 07:00
Bully
import visidia.simulation.process.algorithm.SynchronousAlgorithm;
import visidia.simulation.process.messages.Door;
import visidia.simulation.process.messages.IntegerMessage;
import visidia.simulation.process.messages.StringMessage;
public class Bully extends SynchronousAlgorithm {
@Override
public Object clone() {
return new Bully();
;=====================================================
;
; To learn more about how to configure Polybar
; go to https://github.com/jaagr/polybar
;
; The README contains alot of information
;
;=====================================================
[colors]
@seysn
seysn / RSX-TP2.md
Last active February 9, 2017 10:48

TP n°2 : Liaison de données

CAPTURE DE TRAMES

  1. ifconfig affiche l'état des interfaces actuellement définies.
  2. eth0 et lo
  3. eth0 car UP BROADCAST
  4. Adresse MAC : 98:90:96:bb:8c:81
@seysn
seysn / tp3-bdd.md
Last active October 10, 2016 11:51

TP3 : Requêtes SQL intermédiaire

Question 1

SELECT anom as ARTICLE, count(acoul) as NB_COUL
FROM Articles
GROUP BY anom;