- Download and install Ghostscript for windows (http://downloads.ghostscript.com/public/gs916w32.exe)
- Optional - Add the ghostscript directory to the path environment variable
- Control Panel > System > Advanced System Settings > Environment Variables
- Add
;C:\Program Files (x86)\gs\gs9.16\bin
to th end of thePATH
variable
# Edit profile with the following command | |
# notepad $PROFILE | |
function prompt { | |
Write-Host -ForegroundColor DarkGray $executionContext.SessionState.Path.CurrentLocation | |
[char]::ConvertFromUtf32(0x276f) + ' ' | |
} | |
Invoke-Command -ScriptBlock { | |
Write-Host " User: " -ForegroundColor DarkGray -NoNewline |
REM ======================================================================= | |
REM Batch (.BAT) script (Windows) to delete all temporary files after | |
REM compiling a project with Microsoft Visual Studio (Visual C++) or GCC. | |
REM | |
REM Warning: It also deletes the debug databases, needed to "step into" | |
REM from a debugger. These files may be really *large*, but if you think | |
REM you will need them, remove the file for "*.pdb" below. | |
REM | |
REM Usage: | |
REM - Open a terminal (Windows-key + R , type "cmd", press ENTER) |
## list available environment variables | |
SET | |
#Useful dynamic variables | |
%CD% %DATE% %TIME% %RANDOM% %ERRORLEVEL% %CMDEXTVERSION% %CMDCMDLINE% %HIGHESTNUMANODENUMBER% | |
#The environmental variable %ERRORLEVEL% contains the return code of the last executed program or script. | |
IF %ERRORLEVEL% NEQ 0 ( | |
REM do something here to address the error | |
) | |
# To execute a follow-on command after sucess, we use the && operator: |
# Import Posh-Git and configure Git prompt | |
Import-Module posh-git | |
#Import-Module ~\GitHub\dahlbyk\posh-git\src\posh-git.psd1 | |
#Import-Module ~\GitHub\dahlbyk\posh-git\out\posh-git\1.0.0\posh-git.psd1 | |
# Windows PowerShell doesn't parse `e or `u escape sequences in DQ strings. I added that support to the PS parser in 6.0 | |
if ($PSVersionTable.PSVersion.Major -lt 6) { | |
$global:GitPromptSettings.WindowTitle = { | |
param($GitStatus, [bool]$IsAdmin) |
"""Batch convert images to greyscale [by Thomas Antony]. | |
Install dependencies: | |
pip install pillow docopt | |
Note: If you do not provide an output path, the generated files will be saved | |
in a folder named "Converted" | |
Usage: | |
greyscale.py <in_path> [<out_path>] |
As a developer, it bothers me when someone sends me a large pdf file compared to the number of pages. Recently, I recieved a 12MB scanned document for just one letter-sized page... so I got to googlin, like I usually do, and found ghostscript!
to learn more abot ghostscript (gs): https://www.ghostscript.com/
What we are interested in, is the gs command line tool, which provides many options for manipulating PDF, but we are interested in compressign those large PDF's into small yet legible documents.
credit goes to this answer on askubuntu forum: https://askubuntu.com/questions/3382/reduce-filesize-of-a-scanned-pdf/3387#3387?newreg=bceddef8bc334e5b88bbfd17a6e7c4f9
Since XAMPP 5.5.30 and 5.6.14, XAMPP ships MariaDB instead of MySQL. MariaDB is not 100% compatible with MySQL and can be replaced with the "orginal" MySQL server.
- Backup the old database into a sql dump file
- Stop the MariaDB service
- Rename the folder:
c:\xampp\mysql
toc:\xampp\mariadb
- Download and install Ghostscript and ImageMagick + Convert Module
- Execute the following command in the console (change the filename)
$ convert -density 200 INPUT.pdf -rotate 0.3 +noise Multiplicative -format pdf -quality 85 -compress JPEG -colorspace gray OUTPUT.pdf
- -density: set the input DPI to 200
- -rotate: set Page rotation to 0.3 degrees
// Help needed: I failed to send a value to the text resize and to apply it. Any idea ? | |
// to install this script: install the violentmonkey extension. Then click on "raw" on this github page. | |
// *perso note: | |
//to install or to send update: | |
// 1/ edit must be done on github (cf. the url in the tab settings). | |
// 2/ Edit/update the script (using the edit github button) + increase the version (or it will ask to reinstall in the next step) | |
// (don't need to increase the version if the change are just for myself: just reinstall it to keep the version) | |
// 3/ click on RAW (it will show the changes). |