Skip to content

Instantly share code, notes, and snippets.

View prasenr's full-sized avatar
🎯
Focusing

Prasen Revankar prasenr

🎯
Focusing
View GitHub Profile
@prasenr
prasenr / watcher.py
Created December 17, 2018 00:48 — forked from ajdavis/watcher.py
Script based on the Python "watchdog" module to run tasks when files change.
#!/usr/bin/env python
import os
import re
import threading
import time
import subprocess
from os.path import splitext, expanduser, normpath
import click
@prasenr
prasenr / UIColor_to_Hex.swift
Last active July 27, 2018 08:06
UIColor to Hex and Back
/*
Credits
=======
https://cocoacasts.com/from-hex-to-uicolor-and-back-in-swift
Usage
===========
let green = UIColor(hex: "12FF10")
let greenWithAlpha = UIColor(hex: "12FF10AC")
@prasenr
prasenr / AFHTTPSessionManager_Subclass.m
Last active July 27, 2018 07:59
AFHTTPSessionManager - Subclass
//Ref - http://hastebin.com/yemoninaku.m
@implementation AFHTTPSessionManager (TMLHeaderFields)
- (NSURLSessionDataTask *)GET:(NSString *)URLString
parameters:(id)parameters
headerFields:(NSDictionary *)headerFields
success:(void (^)(NSURLSessionDataTask *task, id responseObject))success
failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure
{