- Download the latest zsh package: https://packages.msys2.org/package/zsh?repo=msys&variant=x86_64
Example:
zsh-5.7.1-1-x86_64.pkg.tar.xz
Example:
zsh-5.7.1-1-x86_64.pkg.tar.xz
This can reduce files to ~15% of their size (2.3M to 345K, in one case) with no obvious degradation of quality.
ghostscript -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/printer -dNOPAUSE -dQUIET -dBATCH -sOutputFile=output.pdf input.pdf
Other options for PDFSETTINGS:
Simple collection of Groovy scripts to help me maintain some Jenkins systems.
See also https://wiki.jenkins-ci.org/display/JENKINS/Jenkins+Script+Console
##################### | |
# | |
# Use this with or without the .gitattributes snippet with this Gist | |
# create a fixle.sh file, paste this in and run it. | |
# Why do you want this ? Because Git will see diffs between files shared between Linux and Windows due to differences in line ending handling ( Windows uses CRLF and Unix LF) | |
# This Gist normalizes handling by forcing everything to use Unix style. | |
##################### | |
# Fix Line Endings - Force All Line Endings to LF and Not Windows Default CR or CRLF |
Based on the excellent Solarized (Dark) created by Ethan Schoonover. For source code, check the main Solarized repository on GitHub.
Open and save Solarized Dark.terminal.
Import from the “Profiles” tab in the settings of Terminal.app or just double-click the file after downloading.
#!/usr/bin/env python | |
""" | |
Recursively find and replace text in files under a specific folder with preview of changed data in dry-run mode. | |
The preview is automatically shown in `--dry-run` mode. | |
To also show the preview for write mode use the verbose flag, i.e. `--verbose` or `-v`. | |
Parameters should preferrably use single quotes, especially for the glob switch, i.e. `--glob='*.html'`. |
1. list all remote tags | |
git ls-remote --tags | |
2. delete local tag | |
git tag -d V_1_0_1 | |
3. push tag deletion to remote | |
git push origin :refs/tags/V_1_0_1 | |
4. tag local branch again |
#!/bin/sh | |
# source of the script can be found at: https://gist.github.com/ad3bbd9d5cafea47bfd66367a0a8cdb6.git | |
#Check the space on the computer before clean up | |
df -h | |
#Check the Drive Space Used by Cached Files | |
du -sh /var/cache/apt/archives | |
#Clean all the log file |
#!/bin/bash | |
# Script origin @ https://gist.github.com/delphym/687927bf521f598714e27804304ceca4 | |
# Setup | |
# | |
# - Create a new Jenkins Job | |
# - Mark "None" for Source Control Management | |
# - Select the "Build Periodically" build trigger | |
# - configure to run as frequently as you like | |
# - Add a new "Execute Shell" build step |