Skip to content

Instantly share code, notes, and snippets.

View akashkahalkar's full-sized avatar
🎯
Focusing

Akash Kahalkar akashkahalkar

🎯
Focusing
View GitHub Profile
@akashkahalkar
akashkahalkar / findAll
Created October 2, 2023 05:39
recusrivly find all file type matching extension
ls -R | grep '\.png$'
@akashkahalkar
akashkahalkar / GetExifData.py
Created February 1, 2020 17:58
Get and parse exif data for an image.
from PIL import Image
from PIL.ExifTags import TAGS
from PIL.ExifTags import GPSTAGS
import pprint
#get exif data from images
def get_exif(filename):
image = Image.open(filename)
image.verify()
return image._getexif()
@akashkahalkar
akashkahalkar / Extension+String.swift
Last active January 26, 2020 05:17
String extension to suppport MD5, SHA256 hashing functions.
//
// Extension+String.swift
// Extension for string with hashing support
//
// Created by Akash Kahalkar on 24/01/20.
// Copyright © 2020 Akash Kahalkar. All rights reserved.
//
/**
Description:
@akashkahalkar
akashkahalkar / letterImageGenerator.swift
Created July 28, 2019 05:29
Create app icon for iPhone
class func imageWith(name: String?) {
//sizes = [Int]
sizes.forEach { (value) in
let frame = CGRect(x: 0, y: 0, width: value, height: value)
let nameLabel = UILabel(frame: frame)
nameLabel.textAlignment = .center
nameLabel.backgroundColor = .black
nameLabel.textColor = .white
var fontSize = 25
if value == 120 {
@akashkahalkar
akashkahalkar / startUpScript.scpt
Created June 6, 2019 15:37
Apple script to automatically start items after login
set apps to {"safari", "itunes"}
repeat with appToStart in apps
tell application appToStart to launch
delay 2
end repeat
delay 5
tell application "Safari"
if it is not running then
launch
end if
@akashkahalkar
akashkahalkar / Utilities.swift
Last active May 13, 2019 17:25
File Manager Useful Functions
/*
isDirectory is Objective-C pointer
kind of black magic that u can use to check is directory exists or not
*/
func directoryExistsAtPath(_ path: String) -> Bool {
var isDirectory = ObjCBool(true)
let exists = FileManager.default.fileExists(atPath: path, isDirectory: &isDirectory)
return exists && isDirectory.boolValue
}
//
// CatLog.swift
// Simple Logger in swift
//
// Created by Akash kahalkar on 05/12/18.
// Copyright © 2018 Akashka. All rights reserved.
//
import Foundation
enum LogEvent: String {