Skip to content

Instantly share code, notes, and snippets.

Mike Steele mikesteele

Block or report user

Report or block mikesteele

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:25d104b465c2db558cf46975e6cf3d69
.grid {
display: grid;
grid-template-columns: repeat(n, 1fr);
}
View keybase.md

Keybase proof

I hereby claim:

  • I am mikesteele on github.
  • I am mikesteele (https://keybase.io/mikesteele) on keybase.
  • I have a public key whose fingerprint is B845 3308 202C 5152 06EA 6FC9 24A6 B169 9877 0560

To claim this, I am signing this object:

@mikesteele
mikesteele / unescape.swift
Last active Sep 7, 2018
Unescape HTML special characters of String in Swift
View unescape.swift
func convertSpecialCharacters(string: String) -> String {
var newString = string
var char_dictionary = [
"&": "&",
"&lt;": "<",
"&gt;": ">",
"&quot;": "\"",
"&apos;": "'"
];
for (escaped_char, unescaped_char) in char_dictionary {
@mikesteele
mikesteele / hashStringToColor.swift
Last active Jun 12, 2018
Hash string to UIColor in Swift
View hashStringToColor.swift
func hashStringToColor(string: String) -> UIColor {
var hash: Int = string.hashValue
var r: Int = (hash & 0xFF0000) >> 16
var g: Int = (hash & 0x00FF00) >> 8
var b: Int = (hash & 0x0000FF)
return rgbaToUIColor(r: r, g: g, b: b, a: 1.0)
}
func rgbaToUIColor(#r: Int, #g: Int, #b: Int, #a: Float) -> UIColor {
let floatRed = CGFloat(r) / 255.0
You can’t perform that action at this time.