Skip to content

Instantly share code, notes, and snippets.

View kaunteya's full-sized avatar

Kaunteya Suryawanshi kaunteya

View GitHub Profile
@kaunteya
kaunteya / .emacs
Last active August 29, 2015 14:16
This is my emacs configuration file
;gist -u 2ce292e369c1a2b5476d .emacs
(require 'package)
(add-to-list 'package-archives
'("melpa" . "http://melpa.milkbox.net/packages/") t)
;C-xrje
(set-register ?e '(file . "~/.emacs")) ;kkk
(set-register ?z '(file . "~/.zshrc")) ;kkk
@kaunteya
kaunteya / scaleK
Last active March 5, 2016 19:47
This bash script creates icon of all the required sizes for OS X | iOS | Android
#!/bin/bash
inputFile=$1
directoryName=$2
[ $# -ne 2 ] && echo "Arguments improper. scaleK image.png outputdirectory " && exit
[ ! -f $inputFile ] && echo "File not found!" && exit;
sizeArrayMac=('16' '32' '128' '256' '512')
sizeArrayiOS=('29' '40' '60')
@kaunteya
kaunteya / circle.playground
Created March 24, 2015 11:52
Xcode playground to draw a circle
// Playground - noun: a place where people can play
import Cocoa
import XCPlayground
let graphWidth: CGFloat = 400.0;
let graphHeight: CGFloat = 400.0
var frameRect = NSRect(x: 0, y: 0, width: graphWidth, height: graphHeight)
var view = NSImageView(frame: frameRect)
@kaunteya
kaunteya / Keyboard symbol list
Created April 3, 2015 15:44
List of all the keyboard symbols
Full Keyboard Symbol List:
⌘ is command

⌥ is option

⌃ is control

⇧ is shift

⇪ is caps lock

← is left arrow

→ is right arrow

↑ is up arrow

↓ is down arrow

extension Bool {
init<T : IntegerType>(_ integer: T){
self.init(integer != 0)
}
/// True => 1 False => 0
var toInt: Int {
return self ? 1 : 0
}
@kaunteya
kaunteya / XCode backup
Created August 11, 2015 07:06
This file has the list of files which are required to backuped in case OS X account is to be formatted
.zshrc
.zshhistory
CGWindowLevelKey.BaseWindowLevelKey 0
CGWindowLevelKey.MinimumWindowLevelKey 1
CGWindowLevelKey.DesktopWindowLevelKey 2
CGWindowLevelKey.BackstopMenuLevelKey 3
CGWindowLevelKey.NormalWindowLevelKey 4
CGWindowLevelKey.FloatingWindowLevelKey 5
CGWindowLevelKey.TornOffMenuWindowLevelKey 6
CGWindowLevelKey.DockWindowLevelKey 7
CGWindowLevelKey.MainMenuWindowLevelKey 8
CGWindowLevelKey.StatusWindowLevelKey 9
@kaunteya
kaunteya / CountDownTimer.swift
Created May 28, 2021 09:18
CountDown timer implemented in combine
import Foundation
import Combine
struct CountDownTimer: Publisher {
struct TimeRemaining: CustomStringConvertible {
let min, seconds, totalSeconds: Int
var description: String {
String(format: "%02d:%02d", min, seconds)
}