Skip to content

Instantly share code, notes, and snippets.

View edkf's full-sized avatar

Edgard Kozlowski edkf

View GitHub Profile
require 'colorize'
# GREET
def greet
puts "
_____ _ _ _ _
| _ |_ _ ___ ___|_|___| |_ ___ ___ ___| |_|___ ___
| __| | | _| _| | | | .'| | . | | | | | -_|
|__| |___|_| |_| |_|_|_|_|_|__,| |___|_|_|_|_|_|_|___|
.squared-wrapper {
position: relative;
&::before {
content: '';
display: block;
padding-bottom: 100%;
}
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Console Tricks!</title>
</head>
<body>
<p onClick="makeGreen()">×BREAK×DOWN×</p>
<!--
_ _ _
| |__ __ _| | __ _ ___ ___ | |__ __ _ ___ ___
| '_ \ / _` | |/ _` |/ __/ _ \| '_ \ / _` | / __/ _ \
| |_) | (_| | | (_| | (_| (_) | |_) | (_| || (_| (_) |
|_.__/ \__,_|_|\__,_|\___\___/|_.__/ \__,_(_)___\___/
-->
███████╗██████╗ ██╗ ██╗███████╗ ██████╗ ██████╗ ███╗ ███╗ ██████╗ ██████╗
██╔════╝██╔══██╗██║ ██╔╝██╔════╝██╔════╝██╔═══██╗████╗ ████║ ██╔══██╗██╔══██╗
█████╗ ██║ ██║█████╔╝ █████╗ ██║ ██║ ██║██╔████╔██║ ██████╔╝██████╔╝
██╔══╝ ██║ ██║██╔═██╗ ██╔══╝ ██║ ██║ ██║██║╚██╔╝██║ ██╔══██╗██╔══██╗
███████╗██████╔╝██║ ██╗██║██╗ ╚██████╗╚██████╔╝██║ ╚═╝ ██║██╗██████╔╝██║ ██║
╚══════╝╚═════╝ ╚═╝ ╚═╝╚═╝╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚═╝╚═════╝ ╚═╝ ╚═╝
qp qp
"" ""
.g8"""bgd `7MMF' `7MMF'`7MM"""YMM MMP""MM""YMM .p8"""8q.;" `7MMF' A `7MF'`7MN. `7MF'
.dP' `M MM MM MM `7 P' MM `7 6M' XMp `MA ,MA ,V MMN. M
dM' ` MM MM MM d MM 6MP ;" YMb VM: ,VVM: ,V M YMb M
MM MMmmmmmmMM MMmmMM MM 8MI ,/' IM8 MM. M' MM. M' M `MN. M
MM. `7MMF' MM MM MM Y , MM YMb ;" dM9 `MM A' `MM A' M `MM.M
`Mb. MM MM MM MM ,M MM YMX ,M9 :MM; :MM; M YMM
`"bmmmdPY .JMML. .JMML..JMMmmmmMMM .JMML. ;"`"bmmmd"' VF VF .JML. YM
# Create a coinRow component
coinRow = new Layer
parent: list.content
width: Screen.width
height: 100
y: 101 * index
backgroundColor: '#DDDDDD'
# Showing the name with a TextLayer
coinName = new TextLayer
# Getting data from the CoinMarketCap API
coins = JSON.parse Utils.domLoadDataSync 'https://api.coinmarketcap.com/v1'
# Declare the FlowComponent
flow = new FlowComponent
# After that, declare the first screen of our project
flow.showNext(list)
# Create a Scroll componnent named list, that will wrap all coinRows
list = new ScrollComponent
width: Screen.width
height: Screen.height
# Set the backgrond color for the scroll content
list.content.backgroundColor = '#FFFFFF'
# Remove scroll horizontal option in the scroll component
list.scrollHorizontal = false