Skip to content

Instantly share code, notes, and snippets.

View avinassh's full-sized avatar

Avinash Sajjanshetty avinassh

View GitHub Profile
@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 / 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?