This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'httparty' | |
txt = open("instagram.txt") | |
users = txt.read.split("\n") | |
usersHash = {} | |
users.each { |u| | |
url = "https://www.instagram.com/#{u}/?__a=1" | |
response = HTTParty.get(url) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//: Playground - noun: a place where people can play | |
import UIKit | |
// Seems I missed quite the discussion. By default setters and getters are provided on all variables in Swift with the use of either let or var respectively. | |
// So if on basic types (structs) I want: | |
// - getters only, I use let. | |
// - getters/setters, I use var. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation | |
// MARK: - Comparable | |
extension NSDecimalNumber: Comparable {} | |
public func ==(lhs: NSDecimalNumber, rhs: NSDecimalNumber) -> Bool { | |
return lhs.compare(rhs) == .OrderedSame | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Basic C, but being used in a Swift project of mine. | |
// Just a simple way of getting any floating number to round up or down to a 5 cent figure for calulations. | |
let x = 45.23 | |
let y = 23.58 | |
let z = 82.12 | |
a = round(x/0.05)*0.05 | |
b = round(y/0.05)*0.05 | |
c = round(z/0.05)*0.05 |