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
#!/usr/bin/env python3 | |
"""Insert LaTex equation (for https://stackoverflow.com/) | |
Add LaTex equation under the shape of PNG image to your stackoverflow post. | |
Print text to add to your post, and download the image equation if necessary. | |
(use https://chart.googleapis.com). | |
See help with -h and --help option for more details. |
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
#!/usr/bin/env bash | |
# | |
# compress-img.bash | |
# | |
# Reduce size by 50% for each given image by copying that in | |
# a new folder ./compressed. | |
# | |
# You can reduce size or quality of each image, if you don't want, | |
# send a link to application where there are your images. And this | |
# script is usless for your use case. |
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
#!/usr/bin/env bash | |
rows=$1 | |
columns=$2 | |
pdfname=$3 | |
# There are ${rows}x${columns} slides per pdf page. | |
# Create a new pdf file <name>-nub.pdf in the current folder for pdfname=<name>.pdf | |
pdfnup --no-landscape --a4paper --nup ${columns}x${rows} ${pdfname} |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Page Title</title> | |
<meta name="description" content="Ma description" /> | |
<!-- -CSS --> | |
<link rel="stylesheet" href="file.css"> | |
<style type="text/css"> | |
p { |
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
# Check that your MongoDB Server and your MongoDB Client are the same. | |
# MongoDB Server (daemon mongod) | |
$ mongod --version | |
# Or mongo then : | |
# > db.version() | |
# or | |
# > db.serverStatus().version | |
# MongoDB Client (processus mongo, your MongoDB Shell) |
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
#!/bin/bash | |
for filename in `ls -1 | grep -E .mp4$\|.wmv$\|.ogv$`; do | |
ext="${filename##*.}" | |
name="${filename%.*}" | |
mv "${name}.${ext}" "${name}_v1.${ext}" | |
done |
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
Open the /etc/systemd/logind.conf file in a text editor as root, for example, | |
sudo -H gedit /etc/systemd/logind.conf | |
Add a line HandleLidSwitch=ignore (make sure it's not commented out!), | |
Restart the systemd daemon with this command: | |
sudo restart systemd-logind |
NewerOlder