corriger le message d'un commit
git commit --amend -m Nouveau message pour le commit
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#simple unzip | |
unzip latest.zip | |
#To unzip a ZIP file in a different directory than the current one, use the -d switch. | |
unzip filename.zip -d /path/to/directory | |
#To enable and disable services to auto-start at reboot, use the following commands | |
#Enable service |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package sqlDatabase; | |
import java.sql.Connection; | |
import java.sql.DriverManager; | |
import java.sql.ResultSet; | |
import java.sql.Statement; | |
public class Main { | |
public static Connection getConnection() throws Exception { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public List<Question> getAllQuestions() { | |
List<Question> questions = new ArrayList<Question>(); | |
Connection connection = null; | |
Statement statement = null; | |
ResultSet resultSet = null; | |
try { | |
connection = ConnectionConfiguration.getConnection(); | |
statement = connection.createStatement(); | |
resultSet = statement.executeQuery("SELECT* FROM questions ORDER BY RAND() LIMIT 8"); |
➡ Generate a mock for your mobile application https://mockuphone.com/
➡ Online markdown editor https://stackedit.io/app
➡ Generate a mock for your website https://magicmockups.com/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
window.onload=()=> { | |
let form = document.querySelector('#form-search') | |
let btnSubmit= form.querySelector("button[type=submit]") | |
const btnSubmitText= btnSubmit.textContent | |
form.addEventListener("submit",function(e){ | |
e.preventDefault() | |
let searchField= form.querySelector('#q') | |
app.showAjaxAnimation() | |
const requestUri=form.getAttribute('href') | |
let xhr = new XMLHttpRequest(); |
Post-installation steps for Linux:
#Manage Docker as a non-root user🔗
The Docker daemon binds to a Unix socket instead of a TCP port. By default that Unix socket is owned by the user root and other users can only access it using sudo. The Docker daemon always runs as the root user. $- sudo usermod -aG $USER
To create the docker group and add your user:
Create the docker group.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 80 default_server; | |
listen [::]:80 default_server ipv6only=on; | |
server_name localhost; | |
root /var/www; | |
index index.php index.html index.htm; | |
location / { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
user nginx; | |
worker_processes 4; | |
daemon off; | |
error_log /var/log/nginx/error.log warn; | |
pid /var/run/nginx.pid; | |
events { | |
worker_connections 1024; | |
} |