Skip to content

Instantly share code, notes, and snippets.

View f-meloni's full-sized avatar
:octocat:
Opensource Lover

Franco Meloni f-meloni

:octocat:
Opensource Lover
View GitHub Profile
@jfharden
jfharden / ps4-games-on-disc.md
Last active November 27, 2019 12:54
My collection of PlayStation 4 games on disc

Non-VR Games

  • The Witcher 3: Wild Hunt
  • Air Conflicts: Pacific Carriers Playstation 4 Edition
  • No mans sky
  • Star Wars Battlefront
  • Middle Earth: Shadow of Mordor Game of the Year Edition
  • Alien Isolation
  • Carmageddon: Max Damage
@jackreichert
jackreichert / getKeyVals
Last active March 19, 2020 07:12
This is a swift extension for NSURL so you can parse the query string and get back a dictionary of the variables.
extension NSURL {
func getKeyVals() -> Dictionary<String, String>? {
var results = [String:String]()
var keyValues = self.query?.componentsSeparatedByString("&")
if keyValues?.count > 0 {
for pair in keyValues! {
let kv = pair.componentsSeparatedByString("=")
if kv.count > 1 {
results.updateValue(kv[1], forKey: kv[0])
}
@mchambers
mchambers / reflect.swift
Last active March 5, 2021 09:20
Basic Reflection in Swift.
// Let's define a basic Swift class.
class Fruit {
var type=1
var name="Apple"
var delicious=true
}
// We can get at some info about an instance of an object using reflect(), which returns a Mirror.
reflect(Fruit()).count
reflect(Fruit())[1].0