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
def i(str) | |
return '' if str.nil? || (stripped = str.strip).empty? | |
"๐งฒ#{stripped}๐งฒ" | |
end | |
def convert(input) | |
input.gsub(/๐ช([^๐ค๐ช]+)?((๐ค([^๐ค๐ช]+)๐ค([^๐ค๐ช]+)?)+)๐ช/) do | |
m = Regexp.last_match | |
s = "๐ค#{i m[1]}" |
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
public class Queue<Element> { | |
private class QueueItem { | |
let value: Element | |
var next: QueueItem? | |
init(_ value: Element) { | |
self.value = value | |
} | |
} | |
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
๐ฎ This extensions adds several methods that wrap strings into ANSI color codes. ๐ฎ | |
๐ ๐ก ๐ | |
๐ฎ Red color ๐ฎ | |
๐ โค๏ธ โก๏ธ ๐ก ๐ | |
๐ ๐ช๐คโe[31m๐ค ๐ ๐คโe[0m๐ค๐ช | |
๐ | |
๐ฎ Green color ๐ฎ | |
๐ ๐ โก๏ธ ๐ก ๐ |
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
๐ฆ sockets ๐ด | |
๐ฆ files ๐ด | |
๐ฎ Represents the HTTP headers and status code ๐ฎ | |
๐ ๐ ๐ | |
๐ฐ statusCode ๐ | |
๐ฐ headers ๐ฏ๐๐ก | |
๐ ๐ @statusCode ๐ @headers ๐ฏ๐๐ก ๐ | |
๐ฎ statusCode @statusCode |