Skip to content

Instantly share code, notes, and snippets.

View avinassh's full-sized avatar

Avinash Sajjanshetty avinassh

View GitHub Profile
@avinassh
avinassh / ScreenshotDetector.swift
Created March 31, 2017 06:22 — forked from ts95/ScreenshotDetector.swift
OS X detect new screenshot event with Swift
import Foundation
typealias NewFileCallback = (fileURL: NSURL) -> Void
class ScreenshotDetector: NSObject, NSMetadataQueryDelegate {
let query = NSMetadataQuery()
var newFileCallback: NewFileCallback?
@avinassh
avinassh / hello_world.md
Created June 20, 2016 06:23 — forked from lava/hello_world.md
Hello, world: Analyzing an interview question to death.

Hello, world!

Please explain in detail what will happen if the following program is executed:

#include <iostream>

int main() {
    std::cout << "Hello, world!" << std::endl;
}
@avinassh
avinassh / devup_ama_notes_jalem_raj_rohit
Created May 30, 2016 16:37 — forked from sudhirkhanger/devup_ama_notes_jalem_raj_rohit
Notes from Jalem Raj Rohit AMA on devup.in
Competitions:-
https://www.kaggle.com/
https://www.hackerearth.com/
Books:-
Introduction to Algorithms By Thomas H Cormen
Pattern Recognition and Machine Learning By Christopher M. Bishop
Freakonomics By Steven D. Levitt and Stephen J. Dubner
@avinassh
avinassh / clipx-homepage.md
Created November 25, 2015 05:01 — forked from captn3m0/clipx-homepage.md
Home Page copy

I want the home page copy to be of a similar style to that of Papa Parse. Basically, there will be a primary hook followed by a QA-style explanation of what ClipX is. This document will hold those QA and other home-page copy till we are ready to commit it to the repository.

What is ClipX?

Its a content syndication service

That was not at all clear.

ClipX archives and stores everything you want to save on the internet. If you've used ifttt, think of it as ifttt for content.

So you store everything I visit? >No. We store whatever you want to. For eg, you may add an article to pocket, or tag it on Feedly, post a link on your facebook wall, or even star it on twitter. ClipX recognizes all these actions and saves the corresponding link into our database.

@avinassh
avinassh / bobp-python.md
Created November 8, 2015 07:32 — forked from sloria/bobp-python.md
A "Best of the Best Practices" (BOBP) guide to developing in Python.

The Best of the Best Practices (BOBP) Guide for Python

A "Best of the Best Practices" (BOBP) guide to developing in Python.

In General

Values

  • "Build tools for others that you want to be built for you." - Kenneth Reitz
  • "Simplicity is alway better than functionality." - Pieter Hintjens
@avinassh
avinassh / container.xml
Created October 27, 2015 05:38 — forked from anqxyr/archived
Create EPUB files with Python
<?xml version='1.0' encoding='UTF-8'?>
<container xmlns="urn:oasis:names:tc:opendocument:xmlns:container" version="1.0">
<rootfiles>
<rootfile media-type="application/oebps-package+xml" full-path="content.opf"/>
</rootfiles>
</container>
@avinassh
avinassh / ls.rst
Created October 25, 2015 12:09 — forked from amitsaha/ls.rst
How does `ls` work?

How does ls work?

I wanted to be really able to explain to a fair amount of detail how does the program :command:`ls` actually work right from the moment you type the command name and hit ENTER. What goes on in user space and and in kernel space? This is my attempt and what I have learned so far on Linux (Fedora 19, 3.x kernel).

How does the shell find the location of 'ls' ?

@avinassh
avinassh / voices.sh
Created October 21, 2015 08:34 — forked from AndrewRayCode/voices.sh
All Mac computer voices. Some are funny, some are disturbing!
COLOR_LIGHT_RED=$(tput sgr0 && tput bold && tput setaf 1)
COLOR_LIGHT_CYAN=$(tput sgr0 && tput bold && tput setaf 6)
COLOR_RESET=$(tput sgr0)
say -v ? | while read line; do
voice=`echo $line | awk '{ print $1 }'`
phrase=`echo $line | sed -E 's/^.+# //'`
echo "${COLOR_LIGHT_RED}say -v ${COLOR_LIGHT_CYAN}${voice}${COLOR_RESET} $phrase"
say -v $voice $phrase
done
@avinassh
avinassh / git-loglive
Created October 14, 2015 16:24 — forked from tlberglund/git-loglive
Log Live Git Command
#!/bin/bash
while :
do
clear
git --no-pager log --graph --pretty=oneline --abbrev-commit --decorate --all $*
sleep 1
done