Skip to content

Instantly share code, notes, and snippets.

View phynet's full-sized avatar
🤘
I said yeah.

Sofia Swidarowicz phynet

🤘
I said yeah.
View GitHub Profile
@phynet
phynet / template-UItableView-Swift.md
Last active November 14, 2023 12:43
Template to create a simple UITableView in a UIViewController
  1. Add UItableView inside ViewController in Storyboard.
  2. Create IBOutlet called tableView
  3. Set Delegate and DataSource in ViewController in Storyboard
class ViewControllerCustom: UIViewController, UITableViewDelegate, UITableViewDataSource {
    
     var items: [String] = ["Swift1", "Swift2", "Swift3"]
@phynet
phynet / Install APK file using Gradle and Command Line in simulators or devices.md
Last active December 22, 2022 16:16
Install APK file using Gradle and Command Line
@phynet
phynet / Generate and Install IPA's file in device through Command Line.md
Last active December 22, 2022 16:15
Generate and Install IPA's file in device through Command Line

##Generate and Install IPA's file in device through Command Line

###Thanks to Mattt and phonegap's scripts

Take a note: all this steps can be automatized in a single script, if you know how to write it. (Bash or Ruby will be fine)

1.- Install your Provisioning Profile and Developer Certificate

2.- Install Shenzhen and ios-deploy: the firstone will generate the IPA file and the secondone will install it onto your device

@phynet
phynet / Jenkins Mac OS X configuration.md
Last active June 4, 2022 16:27
Jenkins Mac OS X configuration

Jenkins Mac OS X configuration

First, copy the plist file from (take note, that the number 1,590 may vary in each machine)

/usr/local/Cellar/jenkins/1.590

to LaunchAgent folder:

cp /usr/local/Cellar/jenkins/1.590/homebrew.mxcl.jenkins.plist /Users/medianet/Library/LaunchAgents 
@phynet
phynet / Golden
Created May 24, 2017 15:32 — forked from jaylyerly/Golden
Draw the Golden Spiral in Swift
let 𝜋 = M_PI
let ɸ = (1 + sqrt(5))/2
func drawTiles(tileCount: Int, height: Double, context: CGContext) {
let red = CGFloat(arc4random_uniform(100)) / 100.0
let green = CGFloat(arc4random_uniform(100)) / 100.0
let blue = CGFloat(arc4random_uniform(100)) / 100.0
context.setFillColor(red: red, green: green, blue: blue, alpha: 1.0)
let rect = CGRect(x: 0, y: 0, width: height, height: height) // CGFloat, Double, Int
@phynet
phynet / Setting-spaces-between-characters-Swift.md
Last active March 10, 2022 09:15
Setting spaces between characters with Swift

##Setting spaces between characters with Swift (iOS)

###UIButton

    @IBOutlet weak var button: UIButton!

    button.titleLabel?.attributedText = NSAttributedString(string: string, attributes:[ NSKernAttributeName: 1.3])
@phynet
phynet / Type of Software Testing.mkd
Last active July 25, 2021 11:48
Different types of software testing

ACCEPTANCE TESTING

Testing to verify a product meets customer specified requirements. A customer usually does this type of testing on a product that is developed externally.

BLACK BOX TESTING

Testing without knowledge of the internal workings of the item being tested. Tests are usually functional.

COMPATIBILITY TESTING

Testing to ensure compatibility of an application or Web site with different browsers, OSs, and hardware platforms. Compatibility testing can be performed manually or can be driven by an automated functional or regression test suite.

CONFORMANCE TESTING

@phynet
phynet / DictionaryToArray.js
Created December 11, 2015 09:14
Create an array with dictionary values in JAVASCRIPT
var array = [];
for (key in dictPush){
temp = {};
temp[key] = dictPush[key];
array.push(temp);
}
@phynet
phynet / bridging-error.mkd
Last active August 13, 2020 20:35
implicit import bridging header in module is deprecated

now in swift 4 you just have to import a briding header into Test target and reference objc-class .h files there...using @testable import nameOfYourApp should work

In Swift there's a message in "Test Target" that states that the bridging header will be removed in newer versions of swift. I'm using mixed objc and swift clasess, but the UnitTest class is a swift file. Using @testable key was there in code

  @testable import YourProject

You fix it by adding in your Test area the bridging header with objc headers that your test will use: