This file contains hidden or 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 'timers' | |
timers = Timers::Group.new | |
@count = 10 | |
def message_slack_test | |
`curl --data ":pomodoro: #{@count}" $'https://vikingcodeschool.slack.com/services/hooks/slackbot?token=bii9bJoHe1mbns9bBm5lTpb6&channel=%23test'` | |
@count -= 1 | |
end |
This file contains hidden or 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 diagonal_coords(size) | |
left_array = push_array(size, :left) | |
right_array = push_array(size, :right) | |
[left_array, right_array].flatten(1) | |
end | |
def push_array(size, direction) | |
array = Array.new(size) { |x| Array.new(size) { |y| [x,y] }} | |
size.times do |i| | |
case direction |
This file contains hidden or 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
module Main | |
class BoxesController < Volt::ModelController | |
model :store | |
def create_box | |
boxes << Box.new(width: 100, height: 100) | |
end | |
def delete_boxes | |
boxes.reverse.map(&:destroy) |
This file contains hidden or 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
.frog { | |
color: #444EEE; | |
} |
This file contains hidden or 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 'rainbow' | |
class NumberSpiral | |
attr_reader :cursor, :total_diags | |
def initialize(opts = {}) | |
@total_diags = 0 | |
@largest_digit = "1" | |
@grid = {} |
NewerOlder