Skip to content

Instantly share code, notes, and snippets.

View speaktoalvin's full-sized avatar

Alvin speaktoalvin

View GitHub Profile
Example for El Capitan:
sudo /Applications/Install\ OS\ X\ El\ Capitan.app/Contents/Resources/createinstallmedia --volume /Volumes/MyVolume --applicationpath /Applications/Install\ OS\ X\ El\ Capitan.app
Example for Yosemite:
sudo /Applications/Install\ OS\ X\ Yosemite.app/Contents/Resources/createinstallmedia --volume /Volumes/MyVolume --applicationpath /Applications/Install\ OS\ X\ Yosemite.app
Example for Mavericks:
@speaktoalvin
speaktoalvin / _verify-repair-permissions-disk.md
Created July 11, 2016 07:57 — forked from bzerangue/_verify-repair-permissions-disk.md
Mac OS X Utilities via Terminal: (Verify and Repair: Disk Permissions AND Disk / Software Update / TimeMachine)

Verify and Repair Disk Permissions via Terminal (Mac OS X)

Verify Permissions

diskutil verifyPermissions /

Repair Permissions

diskutil repairPermissions /

class Brew {
var temp: Float = 0.0
}
class BrewViewModel : NSObject {
var brew = Brew()
dynamic var temp: Float = 0.0 {
didSet {
self.brew.temp = temp
}

things I don't know

I took this list from What CS majors should know.

I think it is fun to list things I don't know so I did it =D. I actually found it to be a cool exercise -- maybe I should do a fun graphics project and learn about Open GL!

i wrote this because, while i think the things on this list are potentially worth knowing, and I actually think it's an awesome list of project ideas as well as good food for thought for people developing CS curricula (many of the things I don't know are great exercises!) -- I thought it was really weird to say that every CS student should know all of them. I have a CS degree and I learned very few of the things I do know inside my degree.

I classify "do know" as anything that I have a reasonable grasp of or at least some basic experience with -- the kind of experience I'd expect a CS student to be able to get. If I say I don't know something, it means either I know pretty much nothing about it (for "gr

@speaktoalvin
speaktoalvin / introrx.md
Created May 31, 2016 15:16 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
import UIKit
import Foundation
import ReactiveCocoa
import Result
import Dwifft
/**
Encapsulates information about collection view nib/cell registration.
- Nib: UINib.

A number of tech news outlets, including WIRED, GigaOm, and MIT Technology Review, have recently started writing about Multipeer Connectivity ("one weird trick that the NSA hates"). Since the NSHipster article on the subject has been linked to in a lot of this coverage, I wanted to share some additional thoughts on the matter:

Multipeer Connectivity(http://nshipster.com/multipeer-connectivity/) represents a significant shift in the opposite direction of how we conventionally think about mobile applications. Nearly every app on your phone operates in a client-server model, with the device making requests to remote cloud services to send and receive messages, photos, and videos. The [

@speaktoalvin
speaktoalvin / Custom Class
Last active December 4, 2016 21:15
Multipeer Connectivity Framework - Sharing Custom Classes
import UIKit
//MARK: MultiPeer_CustomClass
class MultiPeer_CustomClass : NSObject
{
//MARK: Local Variables
var name : String?
var age : Int?
var email : String?
@speaktoalvin
speaktoalvin / Sending Custom Class
Created April 5, 2016 18:14
Sending Data Using Multipeer from ViewController
import UIKit
class ViewController: UIViewController
{
override func viewDidLoad()
{
super.viewDidLoad()
MultiPeerHelper.sharedInstance.startBrowsingAndAdvertising()
}
@speaktoalvin
speaktoalvin / Class - For Converting to NSData
Created April 5, 2016 18:02
Creating a Custom class in Swift - For converting to NSData
import UIKit
//MARK: MultiPeer_CustomClass
class MultiPeer_CustomClass : NSObject
{
//MARK: Local Variables
var name : String?
var age : Int?
var email : String?