Skip to content

Instantly share code, notes, and snippets.

View pouriaalmassi's full-sized avatar

Pouria Almassi pouriaalmassi

View GitHub Profile
@pouriaalmassi
pouriaalmassi / reddit-hide-username.css
Created February 25, 2019 02:32
A CSS snippet to hide a Reddit user's username.
/* Hide Reddit username new design (2018-) */
div[class*="s1ilcdod-18 dsBbYg"] {
visibility: hidden;
}
/* Hide Reddit username old design (pre-2018) */
span[class="user"] {
visibility: hidden !important;
}
@pouriaalmassi
pouriaalmassi / xcode-sublime-keybinding.txt
Last active February 4, 2022 06:38
Xcode keybindings for Sublime Text
[
{ "keys": ["alt+super+["], "command": "swap_line_up" },
{ "keys": ["alt+super+]"], "command": "swap_line_down" },
{ "keys": ["ctrl+i"], "command": "reindent", "args": {"single_line": false}},
{ "keys": ["alt+0"], "command": "toggle_side_bar" },
{ "keys": ["super+alt+left"], "command": "fold" },
{ "keys": ["super+alt+right"], "command": "unfold" },
{ "keys": ["alt+l"], "command": "show_overlay", "args": {"overlay": "goto", "text": ":"} },
{ "keys": ["alt+shift+j"], "command": "reveal_in_side_bar"},
{ "keys": ["alt+shift+o"], "command": "show_overlay", "args": {"overlay": "goto", "show_files": true} },
@pouriaalmassi
pouriaalmassi / gist:34d74101e4f31e812988c16790449fe0
Created November 9, 2019 00:28
Random Swift image placeholder URL.
extension URL {
/// Use `let url = URL.placeholderImageUrl`
static var placeholderImageUrl: URL? {
let size = Int.random(in: 150..<800)
return placeholderImageUrl(with: CGSize(width: size, height: size))
}
/// Use `let url = URL.placeholderImageUrl(with: CGSize(width: 200, height: 200))`
static func placeholderImageUrl(with size: CGSize) -> URL? {
let services = [
@pouriaalmassi
pouriaalmassi / gist:814bbd7f06a9106ca7a1
Last active November 6, 2016 09:27
AppStore Management and Marketing

AppStore Management and Marketing

Resources outside of the software development process: submission, reviewing sales, marketing, etc.

How to Submit to the store?
Management of an App
@pouriaalmassi
pouriaalmassi / gist:5883db33ac2ee679e69f
Last active November 6, 2016 09:26
Swift Resources

Swift Resources

Resources from Apple
// Swift 2.2
// Xcode Version 7.3 (7D175)
// 1
do {
try coordinator.addPersistentStoreWithType(NSSQLiteStoreType, configuration: nil, URL: url, options: nil)
} catch {
var dict = [String: AnyObject]()
// Build warning:
@pouriaalmassi
pouriaalmassi / ios-bootcamp-resources.markdown
Last active January 4, 2016 06:58 — forked from owen-bnr/ios-bootcamp-resources
iOS & OS X Developer Resources

Blogs

  • ASCII WWDC - WWDC session transcripts.
  • NSHipster - Cocoa weekly from Mattt Thompson. Creator of AFNetworking.
  • objc.io - Great resource where each issue consists of a collection posts that all focus on one over arching topic such as testing, Auto Layout, Swift, etc.
  • Mike Ash - Self described as "Wizard without portfolio" Mike Ash is very widely read in the Cocoa community.
  • Bill Bumgarner's Stack Overflow answers - Long time Apple developer who provides well written answers to some of the hairier questions on ObjC and iOS.
  • iOS Dev Weekly - Excellent and widely read weekly that aggregates some of the best writing in the Cocoa developer community.
  • Stable Kernel - Joe Conway, one of the original authors of BNR's Beginning iOS book and former BNR engineer and instructor.
  • [Big Nerd Ran
# install class-dump
brew install class-dump
# dump the frameworks you're interested in
class-dump -H -o UIKit /Applications/Xcode5-DP.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/UIKit.framework
class-dump -H -o SpringBoardUI /Applications/Xcode5-DP.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/PrivateFrameworks/SpringBoardUI.framework
@pouriaalmassi
pouriaalmassi / gist:31de187cc5fc67eeb570
Created February 18, 2015 02:01
NSURLSession in a Playground
// Playground - noun: a place where people can play
import UIKit
import XCPlayground
XCPSetExecutionShouldContinueIndefinitely(continueIndefinitely: true)
let path = "http://www.reddit.com/r/simpleios.json"
let session = NSURLSession(configuration: NSURLSessionConfiguration.defaultSessionConfiguration())
let url = NSURL(string: path)