1) create a local git repo $ git init 1.5) Save username and password for github $ git config credential.helper store $ git push http://example.com/repo.git Username: <type your username> Password: <type your password> 2) Add…
Programming
PHP Script to return random D&D Monster name
I wanted to have a quick an easy way to get a random name, from say a list of D&D monsters. But I wanted the script to be accessible from anywhere on the network. So…
Installing Visual Studio Code on RHEL
RHEL, Fedora, and CentOS based distributions We currently ship the stable 64-bit VS Code in a yum repository, the following script will install the key and repository: sudo rpm –import https://packages.microsoft.com/keys/microsoft.asc sudo sh -c ‘echo…
Tail -f for windows
Use the powershell command get-content -wait
Getting Started with CocoaPods
Installation make sure the ruby system is up to date $ sudo gem update –system install cocoapods $ sudo gem install cocoapods If you get an error message about fuzzy_match, try this command instead, $…
Connecting a second ViewContoller to another Swift file
Make sure the swift file looks like the default ViewContoller.swift file i.e. import UIKit, inherits from UIViewController, have at least the viewDidLoad function Click on the yellow dot that represents the view controller in the…
Detecting iPad or iPhone in swift
To detect if the user is using an iPad or iPhone or something else in Swift do something like this: switch UIDevice.current.userInterfaceIdiom { case .phone: deviceLavel.text = “iPhone” case .pad: deviceLavel.text = “iPad” case .unspecified:…
How to record an App Preview
1. Connect your iPhone or iPad to you Mac 2. Open Quick Time Player 3. From the File menu, Choose new Movie recording 4. Fromt the drop down next to the record button choose you…
Using a bigger Range of colours from code in Unity
Create a new C# script in your project called CSSColors.cs and then copy and paste the code below into it. You should then be able to use the colour names specified anywhere in your…
Optionals in Swift 3
Swift Optionals A type the either has a “wrapped” value or is nil. e.g. let imagePaths = [“star”: “/glyphs/star.png”,”portrait”: “/images/content/portrait.jpg”,”spacer”: “/images/shared/spacer.gif”] Getting a dictionary’s value using a key returns an optional value, so imagePaths[“star”] has…
Recent Comments