Skip to content

Instantly share code, notes, and snippets.

View imkarthikk's full-sized avatar
:bowtie:
Focusing

Karthik Kamalakannan imkarthikk

:bowtie:
Focusing
View GitHub Profile
#!/bin/bash
# Bash Script to Install FFMPEG in Ubuntu 14.04
# Ref: http://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu
# Optional: install exiftool: apt-get install libimage-exiftool-perl
#
# Author: Edi Septriyanto http://masedi.net <hi@masedi.net>
# Enhanced: Karthik K http://skcript.com <karthik@skcript.com>
########################################################################
CURDIR=$(pwd)
sudo -i
cd
apt-get install build-essential checkinstall && apt-get build-dep imagemagick -y
wget http://www.imagemagick.org/download/ImageMagick.tar.gz
tar xzvf ImageMagick.tar.gz
cd ImageMagick/
./configure --prefix=/opt/imagemagick && make
checkinstall
@imkarthikk
imkarthikk / howto.md
Last active August 29, 2015 14:17 — forked from leomelzer/howto.md
  1. You have Ghostscript installed, right? Otherwise sudo apt-get install ghostscript
  2. This is important and installs the headers (iapi.h etc) which are required but don't come with the default Ghostscript package: sudo apt-get install libgs-dev
  3. I also needed sudo apt-get install gs-esp
  4. For me the pre compiled version of ImageMagick never accepted Ghostscript, so let's remove it: sudo apt-get --purge remove imagemagick
  5. Get the source of ImageMagick, untar it, cd ImageMagick-xx
  6. ./configure --with-gslib=yes [and what else you need]
  7. Confirm in the output near the bottom gslib yes yes and not gslib yes no
  8. make
  9. make install
  10. Run convert -list configure | grep DELEGATES => DELEGATES bzlib djvu freetype gs jpeg jng jp2 lcms png tiff x11 xml zlib
@imkarthikk
imkarthikk / monit.conf
Created May 30, 2015 19:26
nginx configuration for monit
server {
listen 80 default_server;
server_name 192.168.10.69;
location /monit/ {
allow 127.0.0.1;
allow 192.0.0.0/8;
deny all;
proxy_pass http://127.0.0.1:2812;
proxy_set_header Host $host;
@imkarthikk
imkarthikk / install_ffmpeg_ubuntu.sh
Created October 3, 2015 20:43 — forked from xdamman/install_ffmpeg_ubuntu.sh
Install latest ffmpeg on ubuntu 12.04 or 14.04
#!/bin/bash
# Bash script to install latest version of ffmpeg and its dependencies on Ubuntu 12.04 or 14.04
# Inspired from https://gist.github.com/faleev/3435377
# Remove any existing packages:
sudo apt-get -y remove ffmpeg x264 libav-tools libvpx-dev libx264-dev
# Get the dependencies (Ubuntu Server or headless users):
sudo apt-get update
@imkarthikk
imkarthikk / OSX-ElCap-Setup.md
Last active November 12, 2015 04:49
Setup a fresh install OS X 10.11.x El Capitan for developers

Setup the basics

# Default TextEdit to Plaintext and not Rich Text
defaults write com.apple.TextEdit RichText -int 0

# Set the scope of new Finder search to current directory
defaults write com.apple.finder FXDefaultSearchScope -string "SCcf"

# Enable Screensaver for Top-Left hotspot
@imkarthikk
imkarthikk / LazyLoad.js
Created December 8, 2015 14:00 — forked from yocontra/LazyLoad.js
lazy loading react components, useful for video/audio/etc
var React = require('react');
var events = require('add-event-listener');
var isVisible = require('../isVisible');
var LazyLoad = React.createClass({
displayName: 'LazyLoad',
propTypes: {
distance: React.PropTypes.number,
component: React.PropTypes.node.isRequired,
children: React.PropTypes.node.isRequired

Description

This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.

The script is here:

#!/bin/bash
convert $1 -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 $2

Results

@imkarthikk
imkarthikk / nginx.conf
Created December 14, 2015 12:22 — forked from Stanback/nginx.conf
Example Nginx configuration for adding cross-origin resource sharing (CORS) support to reverse proxied APIs
#
# CORS header support
#
# One way to use this is by placing it into a file called "cors_support"
# under your Nginx configuration directory and placing the following
# statement inside your location block(s):
#
# include cors_support;
#
# A limitation to this method is that Nginx doesn't currently send headers

A lot of these are outright stolen from Edward O'Campo-Gooding's list of questions. I really like his list.

I'm having some trouble paring this down to a manageable list of questions -- I realistically want to know all of these things before starting to work at a company, but it's a lot to ask all at once. My current game plan is to pick 6 before an interview and ask those.

I'd love comments and suggestions about any of these.

I've found questions like "do you have smart people? Can I learn a lot at your company?" to be basically totally useless -- everybody will say "yeah, definitely!" and it's hard to learn anything from them. So I'm trying to make all of these questions pretty concrete -- if a team doesn't have an issue tracker, they don't have an issue tracker.

I'm also mostly not asking about principles, but the way things are -- not "do you think code review is important?", but "Does all code get reviewed?".