This file contains hidden or 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/sh | |
# It seems it's very hard to set resample output quality with Ghostscript. | |
# So instead rely on `prepress` preset parameter to select a good /QFactor | |
# and override the options we don't want from there. | |
gs \ | |
-o resampled.pdf \ | |
-sDEVICE=pdfwrite \ | |
-dPDFSETTINGS=/prepress \ |
This file contains hidden or 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
Allow recent versions of Perl to compile automake. | |
For Yocto. Tested on poky (krogoth branch). | |
From https://gist.github.com/xywei/03b546054f0d2e2f76c5ac530c88268a | |
--- a/bin/automake.in 2015-01-06 03:25:55.000000000 +0800 | |
+++ b/bin/automake.in 2017-07-26 13:58:07.086205701 +0800 | |
@@ -3878,7 +3878,7 @@ | |
sub substitute_ac_subst_variables | |
{ | |
my ($text) = @_; |
This file contains hidden or 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 | |
# | |
# Amazon Linux cloud-init script | |
# | |
# Amit Bakshi | |
# 10/2014 | |
# | |
if [ `id -u` -ne 0 ]; then | |
sudo exec /bin/bash -x "$0" "$@" | |
fi |
This file contains hidden or 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
# First install database | |
brew install postgres | |
# Clone and build the PL/pgSQL server-side debugger | |
srcdir=/usr/local/src | |
[ -e "$scrdir" ] || \ | |
sudo sh -c "mkdir $srcdir && chgrp admin $srcdir && chmod g+w $srcdir" | |
cd "$srcdir" |
This file contains hidden or 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
# Thanks to this post: | |
# http://blog.ikato.com/post/15675823000/how-to-install-consolas-font-on-mac-os-x | |
which cabextract>/dev/null || which brew>/dev/null || { echo Please install Homebrew!; exit 1; } | |
install() { | |
local url=https://sourceforge.net/projects/mscorefonts2/files/cabs/PowerPointViewer.exe | |
which cabextract>/dev/null || brew install cabextract | |
mkdir -P ~/tmp/consolas \ | |
&& pushd ~/tmp/consolals \ | |
&& curl -LO "${url}" \ |