Skip to content

Instantly share code, notes, and snippets.

View sdeluce's full-sized avatar

Stéphane Deluce sdeluce

View GitHub Profile
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@sdeluce
sdeluce / openpgp.txt
Created November 10, 2017 12:22
Identité reliée à OpenKeychain
This Gist confirms the Linked Identity in my OpenPGP key, and links it to this GitHub account.
Token for proof:
[Verifying my OpenPGP key: openpgp4fpr:62861febe72f84c13759ff58e616922a060d9fc4]
@sdeluce
sdeluce / openpgp.txt
Created November 10, 2017 12:22
Identité reliée à OpenKeychain
This Gist confirms the Linked Identity in my OpenPGP key, and links it to this GitHub account.
Token for proof:
[Verifying my OpenPGP key: openpgp4fpr:62861febe72f84c13759ff58e616922a060d9fc4]
<persistence xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence http://xmlns.jcp.org/xml/ns/persistence/persistence_2_0.xsd"
version="2.0" xmlns="http://xmlns.jcp.org/xml/ns/persistence">
<persistence-unit name="Test" transaction-type="RESOURCE_LOCAL">
<class>com.polytech.hibernate_tp.model.Employeur</class>
<properties>
<!-- Configuring JDBC properties -->
<property name="javax.persistence.jdbc.url" value="jdbc:mysql://localhost:3306/SGBD_hibernate_tp6" />
<property name="javax.persistence.jdbc.user" value="root" />
@sdeluce
sdeluce / bash.sh
Created August 12, 2017 16:55
Convert CR2 to jpeg OS x bash
for i in *.CR2; do sips -s format jpeg $i --out "${i%.*}.jpg"; done
@sdeluce
sdeluce / bash.sh
Last active August 15, 2017 19:30
Copy roms from usb key
.~~. .~~.
'. \ ' ' / .'
.~..~~~..~.
: .~.'~'.~. :
~ ( ) ( ) ~
( : '~'.~.'~' : )
~ .~ ~. ~
( | | )
'~ ~'
*--~-~--*
## In ~/.zshrc
# Custom Prompt
alias shutdown='sudo shutdown -h now'
# PROMPT='${ret_status}$(tput setaf 1) $HOST %{$fg[cyan]%}%c%{$reset_color%} $(git_prompt_info)'
# PROMPT='$(tput setaf 1)$fg[red]┌─[$fg[cyan] $HOST $fg[red]]─[$(git_prompt_info)] %{$fg[cyan]%}%c%{$reset_color%}
# $fg[red]└──╼ $reset_color%$'
## ┌─[hostname]─[~] git
## └──╼ $ or # if root
sudo apt-get update
sudo apt-get install hostapd isc-dhcp-server
sudo apt-get install iptables-persistent
sudo nano /etc/dhcp/dhcpd.conf
# Find the lines that say
option domain-name "example.org";
option domain-name-servers ns1.example.org, ns2.example.org;
# pour connaitre le numero du peripherique a formater
diskutil list
# remplacer X par la valeur trouvee au dessu
sudo diskutil eraseDisk FAT32 NAME MBRFormat /dev/diskX
@sdeluce
sdeluce / bootable USB
Last active January 27, 2017 18:49
Création d'un clef usb bootable via OsX en Cli
# convertir l'iso en img
hdiutil convert -format UDRW -o ~/path/to/target.img ~/path/to/mint.iso
# Convertir l'img dmg en img
mv ~/path/to/target.img.dmg ~/path/to/target.img
# Liste des périphériques
diskutil list
# Replace N by value find in list