Skip to content

Instantly share code, notes, and snippets.

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]}"
@thbwd
thbwd / Queue.swift
Last active May 3, 2019 09:22
Dead simple Swift queue implementation. Letโ€™s put ARC to work. Itโ€™s here anyways.
public class Queue<Element> {
private class QueueItem {
let value: Element
var next: QueueItem?
init(_ value: Element) {
self.value = value
}
}
๐ŸŒฎ This extensions adds several methods that wrap strings into ANSI color codes. ๐ŸŒฎ
๐Ÿ‹ ๐Ÿ”ก ๐Ÿ‡
๐ŸŒฎ Red color ๐ŸŒฎ
๐Ÿ– โค๏ธ โžก๏ธ ๐Ÿ”ก ๐Ÿ‡
๐ŸŽ ๐Ÿช๐Ÿ”คโŒe[31m๐Ÿ”ค ๐Ÿ• ๐Ÿ”คโŒe[0m๐Ÿ”ค๐Ÿช
๐Ÿ‰
๐ŸŒฎ Green color ๐ŸŒฎ
๐Ÿ– ๐Ÿ’š โžก๏ธ ๐Ÿ”ก ๐Ÿ‡
@thbwd
thbwd / httpTest.emojic
Created February 19, 2018 20:17
HTTP Request
๐Ÿ“ฆ sockets ๐Ÿ”ด
๐Ÿ“ฆ files ๐Ÿ”ด
๐ŸŒฎ Represents the HTTP headers and status code ๐ŸŒฎ
๐Ÿ‡ ๐Ÿ™ ๐Ÿ‡
๐Ÿฐ statusCode ๐Ÿš‚
๐Ÿฐ headers ๐Ÿฏ๐Ÿš๐Ÿ”ก
๐Ÿˆ ๐Ÿ†• @statusCode ๐Ÿš‚ @headers ๐Ÿฏ๐Ÿš๐Ÿ”ก ๐Ÿ‡
๐Ÿฎ statusCode @statusCode