Skip to content

Instantly share code, notes, and snippets.

View jayesh15111988's full-sized avatar

Jayesh Kawli jayesh15111988

View GitHub Profile
@candostdagdeviren
candostdagdeviren / pre-commit
Last active April 22, 2023 09:32
Git Pre-Commit hook with SwiftLInt
#!/bin/bash
#Path to swiftlint
SWIFT_LINT=/usr/local/bin/swiftlint
#if $SWIFT_LINT >/dev/null 2>&1; then
if [[ -e "${SWIFT_LINT}" ]]; then
count=0
for file_path in $(git ls-files -m --exclude-from=.gitignore | grep ".swift$"); do
export SCRIPT_INPUT_FILE_$count=$file_path
@zirkler
zirkler / gist:d83f24aeffb332a47dc8372c90026e26
Last active April 19, 2023 13:27
stackview_scrollview
import UIKit
import PlaygroundSupport
class MyViewController : UIViewController {
// 1.
lazy var stackView: UIStackView = {
let stackView = UIStackView()
stackView.axis = .horizontal
stackView.spacing = 20
@jayesh15111988
jayesh15111988 / .zshrc
Last active February 15, 2023 15:32
My zshrc file
function parse_git_branch() {
git branch 2> /dev/null | sed -n -e 's/^\* \(.*\)/[\1]/p'
}
COLOR_DEF=$'\e[0m'
COLOR_USR=$'\e[38;5;243m'
COLOR_DIR=$'\e[38;5;197m'
COLOR_GIT=$'\e[38;5;39m'
setopt PROMPT_SUBST
@stinger
stinger / CombineFetcher.swift
Last active January 28, 2023 18:07
Combine - fetching data using URLSession publishers
import Foundation
import Combine
enum APIError: Error, LocalizedError {
case unknown, apiError(reason: String)
var errorDescription: String? {
switch self {
case .unknown:
return "Unknown error"
@steverichey
steverichey / Iconizer.sh
Last active February 23, 2022 17:40
Create iOS application icons from one PDF file. Requires ImageMagick.
#!/bin/sh
#
# Iconizer shell script by Steve Richey (srichey@floatlearning.com)
#
# This is a simple tool to generate all necessary app icon sizes and the JSON file for an *EXISTING* Xcode project from one file.
# To use: specify the path to your vector graphic (PDF format) and the path to your Xcode folder containing Images.xcassets
# Example: sh iconizer.sh MyVectorGraphic.pdf MyXcodeProject
#
# Requires ImageMagick: http://www.imagemagick.org/
@shazron
shazron / sim-run.sh
Created October 25, 2011 21:53
Run Xcode Simulator project from the command line
#!/bin/bash
#
# Build and iPhone Simulator Helper Script
# Shazron Abdullah 2011
#
# WARN: - if your .xcodeproj name is not the same as your .app name,
# this won't work without modifications
# - you must run this script in where your .xcodeproj file is
PROJECTNAME=$1
import lldb
import commands
def __lldb_init_module (debugger, dict):
debugger.HandleCommand('command script add -f LBRShortcut.window_description_command window_description')
debugger.HandleCommand('command script add -f LBRShortcut.json_data_command json_data')
debugger.HandleCommand('command script add -f LBRShortcut.fire_fault_command fire_fault')
def window_description_command(debbuger, command, result, dict):
@d-a-n
d-a-n / EuropeaniOSDevConferences2018.md
Last active October 8, 2018 11:45
European iOS Dev Conferences for 2018

European iOS Dev Conferences for 2018

Dates Conference Location
Jan 29. dotSwift Paris
March 15. - 16. appdevcon Amsterdam
March 22. - 23. iOSCon London
April 16. - 17. Appbuilders Lugano
May 08. - 11. Craft-Conf Budapest
May 13. - 16. UIKonf Berlin
<?xml version="1.0" encoding="UTF-8"?>
<Bucket
type = "4"
version = "2.0">
<Breakpoints>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.SymbolicBreakpoint">
<BreakpointContent
shouldBeEnabled = "Yes"
ignoreCount = "0"