start new:
tmux
start new with session name:
tmux new -s myname
[ | |
{ "keys": ["f12"], "command": "htmlprettify"}, | |
{ "keys": ["f1"], "command": "fold" }, | |
{ "keys": ["f2"], "command": "unfold" }, | |
{ "keys": ["ctrl+l"], "command": "show_overlay", "args": {"overlay": "goto", "text": "@"} }, | |
{ "keys": ["ctrl+space"], "command": "auto_complete" }, | |
{ "keys": ["ctrl+space"], "command": "replace_completion_with_auto_complete", "context": | |
[ | |
{ "key": "last_command", "operator": "equal", "operand": "insert_best_completion" }, |
// Copy data volume from Host to antoher | |
docker run --rm -v <SOURCE_DATA_VOLUME_NAME>:/from alpine ash -c "cd /from ; tar -cf - . " | ssh <TARGET_HOST> 'docker run --rm -i -v <TARGET_DATA_VOLUME_NAME>:/to alpine ash -c "cd /to ; tar -xpvf - " ' | |
// Inspect a running container | |
> cid=$(docker run -itd NAME) | |
> docker inspect $cid | |
// Running Container ID | |
> docker ps -q |
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Capture Photo</title> | |
<meta name="viewport" content="width=device-width,height=device-height,initial-scale=1"/> | |
<script type="text/javascript" charset="utf-8" src="js/phonegap.js"></script> | |
<script type="text/javascript" charset="utf-8"> | |
var pictureSource; // picture source | |
var destinationType; // sets the format of returned value |
#Upgrade Ubuntu OS Version | |
dpkg --configure -a && apt-get -f install && apt-get update && apt-get dist-upgrade && apt-get autoremove && apt-get clean | |
#!/usr/bin/env python3 | |
""" | |
Detects and interactively deactivates duplicate Apt source entries. | |
Usage: python3 apt-remove-duplicate-source-entries.py | |
""" | |
from __future__ import print_function | |
import aptsources.sourceslist |
uname Affiche le nom du système et la version du noyau.
uname –a Affiche notamment la version du noyau.
cat /etc/*-release ou lsb_release –a Affiche la distribution et sa version.
cat /etc/issue Idem, mais le contenu est modifiable. Ce fichier est affiché avant la connexion.
date Affiche la date et l’heure système.
void main() { | |
/// | |
/// sample using regexp to parse log | |
/// | |
RegExp regExp = new RegExp(r"^(.*m)(\d{1,2}:\d{1,2}:\d{1,2},\d{1,3}) ([^\s]+) (.*)"); | |
var input =""" | |
[0m[31m22:25:57,366 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-8) MSC000001: Failed to start service jboss.deployment.unit."bad.war" | |
"""; | |
var matches = regExp.allMatches(input); |
NOTE: If you want to keep the history for a specific folder in the master
branch, just skip steps in lines 3,4,5,6,7
git clone <git-repository-url>
cd <git-repository-dir>
git checkout <branch-name> # line 3; Checkout the branch of interest
git merge --strategy=ours master # line 4; keep the content of this branch only and record a merge
git checkout master # line 5; Go back to the master branch