Skip to content

Instantly share code, notes, and snippets.

#!/bin/sh
# Alot of these configs have been taken from the various places
# on the web, most from here
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
# Set the colours you can use
black='\033[0;30m'
white='\033[0;37m'
red='\033[0;31m'
@DmitryOtroshchenko
DmitryOtroshchenko / vim_langmap.py
Created November 4, 2014 21:52
Generate vim langmap for colemak
from __future__ import division, unicode_literals, print_function
eng = 'qwfpgjluy[]arstdhneiozxcvbkm'
ru = 'яьфпгжлуышэарстдхнеиозчцвбкм'
langmap_lower = ','.join('{}{}'.format(e, r) for e, r in zip(ru, eng))
langmap = ','.join((langmap_lower, langmap_lower.upper()))
print(langmap)
# Written by Brendan O'Connor, [email protected], www.anyall.org
# * Originally written Aug. 2005
# * Posted to gist.github.com/16173 on Oct. 2008
# Copyright (c) 2003-2006 Open Source Applications Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# Compress pdf
# Quality level could be set to /screen, /ebook, /printer, /prepress
gs -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=<quality> -sOutputFile=<output.pdf> <input.pdf>