Skip to content

Instantly share code, notes, and snippets.

View mitulmanish's full-sized avatar
🍏
🛩🇪🇪

mitul_manish mitulmanish

🍏
🛩🇪🇪
View GitHub Profile
@hoyelam
hoyelam / share_sheet_swiftui_example.swift
Created January 26, 2021 19:07
Share Sheet UIActivityViewController within SwiftUI
import SwiftUI
struct ContentView: View {
var body: some View {
VStack {
Text("Hello, world!")
.padding()
.shareSheet(items: ["Hello world!"])
Text("Hello, world!")
@kcak11
kcak11 / App.md
Last active June 3, 2024 07:24
Country Codes

Country Codes

List of all Country Codes (ISO & Dialing) sorted in alphabetical order.

@Pasanpr
Pasanpr / blogs.txt
Created July 25, 2016 14:57
Blogs!
Bryan Irace: http://irace.me/
Chris Eidhof: http://chris.eidhof.nl/
Objc.io: https://www.objc.io/
Airspeed Velocity: https://airspeedvelocity.net/
Cocoa With Love: http://www.cocoawithlove.com/
Ash Furrow: https://ashfurrow.com/
Jessie Squires: http://www.jessesquires.com/
Soroush Khanlou: http://khanlou.com/
Ole Begemann: http://oleb.net/
Krzysztof Zabłocki: http://merowing.info/
@zacwest
zacwest / ios-font-sizes.swift
Last active July 17, 2024 21:39
iOS default font sizes - also available on https://www.iosfontsizes.com
let styles: [UIFont.TextStyle] = [
// iOS 17
.extraLargeTitle, .extraLargeTitle2,
// iOS 11
.largeTitle,
// iOS 9
.title1, .title2, .title3, .callout,
// iOS 7
.headline, .subheadline, .body, .footnote, .caption1, .caption2,
]
@kellyegan
kellyegan / ViewController.swift
Last active April 2, 2023 00:57
Send emails with attachments in iOS using Swift
//
// ViewController.swift
// SendEmailWithAttachment
//
// Created by Kelly Egan on 3/17/15.
// Copyright (c) 2015 Kelly Egan. All rights reserved.
//
import UIKit
import MessageUI
@pyk
pyk / active-record-migration-expert.md
Last active August 2, 2021 09:20
become active record migration expert (Rails 4.0.2)

become active record migration expert (Rails 4.0.2)

workflow:

create model

$ rails g model NameOfModel
    invoke  active_record
    create    db/migrate/YYYYMMDDHHMMSS_create_name_of_models.rb
@macek
macek / 20101004063749_create_photos.rb
Created October 4, 2010 22:38
How to save uploaded files to your database in Rails
# db/migrate/20101004063749_create_photos.rb
class CreatePhotos < ActiveRecord::Migration
def self.up
create_table :photos do |t|
t.string :name, :null => false
t.binary :data, :null => false
t.string :filename
t.string :mime_type
t.timestamps