Skip to content

Instantly share code, notes, and snippets.

@asolkar
asolkar / ConvertPDFSizeReduce.md
Last active June 25, 2018 06:59
Linux commands to reduce size of PDF files

Linux commands to reduce size of PDF files

This requires ImageMagick packages to be installed.

  • Reduce quality and remove color:
% convert -colorspace GRAY -density 150x150 -quality 80 -compress jpeg LargeSize.pdf SmallSizeGray.pdf 
  • Reduce quality, preserve color:
@asolkar
asolkar / checkerboard.pl
Created May 5, 2017 03:37
Squares in a checkerboard
#!/usr/bin/perl
use strict;
use warnings;
my $m = shift @ARGV;
my $sqrs = 0;
#
@asolkar
asolkar / vimrc.local.vim
Last active December 5, 2018 05:31
My .vimrc - when I am not using spf13
"
" Vim customization and package management
"
" Base settings {{{
set nocompatible " be iMproved, required
filetype off " required
syntax on
set mouse=a
@asolkar
asolkar / emoji-word-puzzle.html
Last active August 23, 2016 00:06
Emoji word puzzle
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<title>Emoji Puzzle</title>
<meta name="description" content="Emoji code">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="apple-touch-icon" href="apple-touch-icon.png">
@asolkar
asolkar / keybase.md
Created June 15, 2016 04:56
Keybase proof

Keybase proof

I hereby claim:

  • I am asolkar on github.
  • I am asolkar (https://keybase.io/asolkar) on keybase.
  • I have a public key whose fingerprint is 6FD9 5F34 9979 ADE3 86F9 AF49 37FD 288E D44B 8168

To claim this, I am signing this object:

@asolkar
asolkar / Multiplication_short.html
Created September 13, 2015 20:53
Math Exercise
<!DOCTYPE html>
<head>
<meta charset="utf-8">
<title>Multiplication - Short</title>
<meta name="description" content="Multiplication exercise">
<script src="http://code.jquery.com/jquery-2.1.0.min.js"></script>
<style type="text/css">
body {
font-family: "Trebuchet MS", sans-serif;
}
@asolkar
asolkar / 00-Google-for-Work-Riddles
Last active August 29, 2015 14:24
Google for Work Riddles
#
# Google for Work riddles in follow Google+ posts
#
https://plus.google.com/u/0/+GoogleforWork/posts/iGqi6N9dwY3
https://plus.google.com/u/0/+GoogleforWork/posts/3uyrWjgz9cr
https://plus.google.com/u/0/+GoogleforWork/posts/6Z8LKYhJqWd
@asolkar
asolkar / update_dreamip.rb
Created March 22, 2013 08:10
Dynamic DNS updater for Dreamhost
#!/usr/bin/env ruby
require 'net/http'
require 'securerandom'
require 'yaml'
class DreamhostIPUpdater
def initialize(apikey)
@api_url = 'https://api.dreamhost.com/';
@apikey = apikey
@asolkar
asolkar / install_deps.sh
Created December 13, 2012 19:49
Citrix Receiver 12.1 on Debian unstable
% aptitude install libxp6:i386
% aptitude install libsm6:i386
% aptitude install libxmu6:i386
% aptitude install libxinerama1:i386
% aptitude install libglib2.0-0:i386
% aptitude install libxft2:i386
% aptitude install libgtk2.0-0:i386
@asolkar
asolkar / bitcasa.log
Created June 23, 2012 04:17
Folder created with Windows Client mounts on Linux but not accessible, has weird permissions
:) ~ $ cd Bitcasa/
:) ~/Bitcasa $ ls -al
total 18
drwxrwxr-x 4 user1 user1 4096 Jun 8 07:45 .
drwxr-xr-x 83 user1 user1 12288 Jun 8 17:56 ..
drwxr-xr-x 0 user1 user1 0 Jun 9 10:18 User1 Mac
drwxr-xr-x 0 user1 user1 0 Jun 9 10:18 Sample Videos
:) ~/Bitcasa $ ls -al Sample\ Videos
total 59673
drwxr-xr-x 0 user1 user1 0 Jun 9 10:18 .