Skip to content

Instantly share code, notes, and snippets.

View seignovert's full-sized avatar
🪐

Benoît Seignovert seignovert

🪐
View GitHub Profile
@seignovert
seignovert / svg2png.md
Created September 12, 2016 16:34
Command line to convert Convert SVG to PNG

Command line to convert Convert SVG to PNG

On MacOs:

inkscape $(pwd)/IMG.svg --export-area-page --export-png=$(pwd)/OUTPUT.png -w WIDTH -h HEIGHT
@seignovert
seignovert / README.md
Last active August 15, 2024 10:47
[macOS] Set Icon to a File/Folder

Set Icon to a File / Folder on macOS

Since macOS High Sierra sips --addIcon is no longer supported. An easier way to add and image to a file/folder is to use fileicon npm package.

The new syntax is:

fileicon set foo img.png
@seignovert
seignovert / README.md
Last active September 7, 2023 02:01
Enable RSync with Synology DSM 6.0 without RSA SSH-key

Enable RSync with Synology DSM 6.0 without RSA SSH-key

##Enable user home service Open the Control panel, in the User section go to Advanced tab and in the section User Home:

  • Enable user home service Click Apply

##Enable SSH Go to Terminal & SNMP section and:

  • Enable SSH service
@seignovert
seignovert / README.md
Created January 3, 2017 14:07
[Ubuntu] Change default `hostname`

Change hostname on a server

Get the current hostname

hostname

To change the hostname

  • Edit /etc/hostname file (as admin) from old-host-name to new-host-name.
  • Edit known hosts in /etc/hosts if necessary.
@seignovert
seignovert / README.md
Created January 4, 2017 20:18
[Server] Install Gitlab and Mattermost with Let's Encrypt on Ubuntu 16.04

Gitlab and Mattermost installation

Inital DNS and contact emails

Add A record for the following website:

  • git.example.com
  • forum.example.com

And add email redirection for these emails:

@seignovert
seignovert / README.md
Last active February 21, 2019 20:08
[Zenodo] Add ORCID badge

Add ORCID badge to Zenodo publication

No longer required since Oct-2017. Now ORCID can be added directly under the Authors section of the metadata on the deposit web interface.

Create your personal access token

In order to access the API you need to create a personal token. To do that you need to:

  1. Go to Home > Account > Applications and + New token in the Personal access tokens section.
  2. Provide a name for the token to find it later
@seignovert
seignovert / README.md
Last active February 17, 2017 10:45
[Python] Convert local time to UTC

Convert local time to UTC

With Python

Example for Noumea:

python Noumea_to_UTC.py 2017/02/17 09:30:00

Output:

20170216 223000
@seignovert
seignovert / README.md
Last active September 29, 2019 00:09
[PDF] Reduce PDF file size with GhostScript

How yo reduce PDF file size on a Unix system with GhostScript

gs -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/screen -sOutputFile=output.pdf input.pdf

The following parameters for -dPDFSETTINGS can be edited with:

  • /screen – Lowest quality, lowest size
  • /ebook – Moderate quality
  • /printer – Good quality
  • /prepress – Best quality, highest size
@seignovert
seignovert / README.md
Last active February 21, 2019 20:12
[Cassini/VIMS] Python package for VIMS cub from ISIS3

No longer required: see pyvims module.

@seignovert
seignovert / README.md
Created November 23, 2017 16:19
[OPUS] API super powers

OPUS API and its super powers

The NASA PDS Rings Node data search tool OPUS is very useful and user-friendly to extract valuable information from the Planetary Data System (PDS) with a very nice design graphic interface to make complex query on the PDS image database.

And other very powerful tool, which is a little be hidden, is its Application programming interface, known as API. The full user guide is available here.

Here a list of example to make your own crazy queries to extract quickly the information you are seeking for!

How it works