Skip to content

Instantly share code, notes, and snippets.

Igor A. Melekhine awsom82

  • CONST SSK OOO
  • Moscow, Russia
View GitHub Profile
@awsom82
awsom82 / search.go
Last active Mar 14, 2020
Count words on webpages. Usage: echo http://golang.org | go run search.go
View search.go
package main
import (
"bufio"
"bytes"
"fmt"
"io"
"net/http"
"net/url"
"os"
@awsom82
awsom82 / osxpdf.md
Created Feb 14, 2020
OSX PDF operations
View osxpdf.md

Merge pdf by Quartz

/System/Library/Automator/Combine\ PDF\ Pages.action/Contents/Resources/join.py --output all.pdf *.pdf

Compress PDF via GostScript

gs -q -dNOPAUSE -dBATCH -dSAFER -dPDFA=2 -dPDFACompatibilityPolicy=1 -dSimulateOverprint=true -sDEVICE=pdfwrite -dCompatibilityLevel=1.3 -dPDFSETTINGS=/screen -dEmbedAllFonts=true -dSubsetFonts=true -dAutoRotatePages=/None -dColorImageDownsampleType=/Bicubic -dColorImageResolution=150 -dGrayImageDownsampleType=/Bicubic -dGrayImageResolution=150 -dMonoImageDownsampleType=/Bicubic -dMonoImageResolution=15 -sOutputFile=./output.pdf ./input.pdf

@awsom82
awsom82 / pdfopt.sh
Created Feb 28, 2019
pdf optimisation
View pdfopt.sh
gs -sDEVICE=pdfwrite -dNOPAUSE -dQUIET -dBATCH -dPDFSETTINGS=/-"screen" -dCompatibilityLevel=1.4 -sOutputFile="mel.pdf" "mel.pdf"
@awsom82
awsom82 / docker-cleanup.sh
Created Sep 22, 2016
Docker: Remove all images and containers
View docker-cleanup.sh
#!/bin/bash
# Delete all containers
docker rm $(docker ps -a -q)
# Delete all images
docker rmi $(docker images -q)
View keybase.md

Keybase proof

I hereby claim:

  • I am awsom82 on github.
  • I am awsom82 (https://keybase.io/awsom82) on keybase.
  • I have a public key whose fingerprint is 2B59 BDCD D826 5395 D43C D669 1795 4546 78EE E96F

To claim this, I am signing this object:

You can’t perform that action at this time.