Skip to content

Instantly share code, notes, and snippets.

View dornad's full-sized avatar

Daniel Rodriguez dornad

View GitHub Profile
@startuml;
actor User;
participant "First Class" as A;
participant "Second Class" as B;
participant "Last Class" as C;
User -> A: DoWork;
activate A;
@dornad
dornad / movies.json
Last active February 17, 2017 20:06
{
"page": 1,
"results": [
{
"poster_path": "/tvSlBzAdRE29bZe5yYWrJ2ds137.jpg",
"adult": false,
"overview": "Princess Leia is captured and held hostage by the evil Imperial forces in their effort to take over the galactic Empire. Venturesome Luke Skywalker and dashing captain Han Solo team together with the loveable robot duo R2-D2 and C-3PO to rescue the beautiful princess and restore peace and justice in the Empire.",
"release_date": "1977-05-25",
"genre_ids": [
12,
class MovieTableViewController : UITableViewController {
override func viewDidLoad() {
super.viewDidLoad()
tableView.register(MovieCell.self, forCellReuseIdentifier: "MovieCell")
}
}
extension MovieTableViewController {
@dornad
dornad / FindFontName.m
Last active February 8, 2017 16:54
iOS Find Font Names [Objective-C]
///////////////////////////////////////////////////////
//prints out available fonts.
// from http://codewithchris.com/common-mistakes-with-adding-custom-fonts-to-your-ios-app/#uifont
//WARNING!!! YOU MUST FOLLOW ALL THE STEPS TO GET THE FONT TO WORK.
//1. Include the font in the project
//2. Make sure that they’re included in the target
// Check build phases and check the target membership(s))
//3. Double check that your fonts are included as Resources in your bundle. check copy resources in build phases section. make sure font is selected
@dornad
dornad / FindFontName.swift
Last active February 7, 2017 21:28
iOS Find Font Name [Swift 3]
///////////////////////////////////////////////////////
//prints out available fonts.
// Adopted from http://codewithchris.com/common-mistakes-with-adding-custom-fonts-to-your-ios-app/#uifont
//WARNING!!! YOU MUST FOLLOW ALL THE STEPS TO GET THE FONT TO WORK.
//1. Include the font in the project
//2. Make sure that they’re included in the target
// Check build phases and check the target membership(s))
//3. Double check that your fonts are included as Resources in your bundle. check copy resources in build phases section. make sure font is selected
This file has been truncated, but you can view the full file.
Showing All Messages
Build target EventDetails of project EventDetails with configuration Debug
Write auxiliary files
write-file /Users/danielrodriguez/Library/Developer/Xcode/DerivedData/EventDetails-eqemjjsflerddceiqpqrjovmtdbi/Build/Intermediates/EventDetails.build/Debug-iphonesimulator/EventDetails.build/unextended-module-overlay.yaml
/bin/mkdir -p /Users/danielrodriguez/Library/Developer/Xcode/DerivedData/EventDetails-eqemjjsflerddceiqpqrjovmtdbi/Build/Intermediates/EventDetails.build/Debug-iphonesimulator/EventDetails.build/DerivedSources
write-file /Users/danielrodriguez/Library/Developer/Xcode/DerivedData/EventDetails-eqemjjsflerddceiqpqrjovmtdbi/Build/Intermediates/EventDetails.build/Debug-iphonesimulator/EventDetails.build/DerivedSources/EventDetails_vers.c
@dornad
dornad / CoreData Playground Patch
Created October 21, 2016 03:06
Core Data Playground (WIP)
diff --git a/Playgrounds/PricingAPIModels.playground/Contents.swift b/Playgrounds/PricingAPIModels.playground/Contents.swift
index f0c121a..2ada632 100644
--- a/Playgrounds/PricingAPIModels.playground/Contents.swift
+++ b/Playgrounds/PricingAPIModels.playground/Contents.swift
@@ -1,42 +1,50 @@
//: Playground - noun: a place where people can play
import UIKit
+import CoreData
import PPNetworking
@dornad
dornad / PlacesConversion.swift
Created July 20, 2016 15:12
Places Conversion Playground Code
//: Playground - noun: a place where people can play
import UIKit
public class Variable<T> {
var value: T
init(_ value: T) {
self.value = value
}
}
@objc public enum Features: Int {
case ScheduledSendingCoachmark = 0
case AccountVerifyFailureToggle
}
extension Features {
private var userDefaultsKey: String {
switch(self) {
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import re
from subprocess import Popen, PIPE
from subprocess import call
p = Popen(["xcrun","simctl","list","devices"], stdin=PIPE, stdout=PIPE, stderr=PIPE)
output, err = p.communicate(b"input data that is passed to subprocess' stdin")