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
# frozen_string_literal: true | |
class ChangeCalculator | |
COINS = { 200 => '£2', 100 => '£1', 50 => '50p', 20 => '20p', 10 => '10p', 5 => '5p', 2 => '2p', 1 => '1p' }.freeze | |
def self.calculate(amount) | |
new(amount).calculate | |
end | |
def initialize(amount) |
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
package main | |
import ( | |
"fmt" | |
"log" | |
"net/http" | |
"runtime" | |
"time" | |
) |
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
{"lastUpload":"2020-03-05T12:36:19.246Z","extensionVersion":"v3.4.3"} |
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
Entering CLI Mode, type 'exit' to return, or 'help' | |
# dump | |
# version | |
# RaceFlight "RF" 1.9.9 "BB""320" - FS update /REVO Sep 11 2016 / 21:29:22 (e714ceb) | |
# dump master | |
# mixer | |
mixer QUADXL |
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
#!/bin/bash | |
set -e | |
set -o pipefail | |
dfu-util --alt 0 -s 0x08000000:force:unprotect -D "$1" | |
sleep 5 | |
dfu-util -R -a 0 -D "$1" |
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
package main | |
import ( | |
"database/sql" | |
"log" | |
"net/http" | |
_ "github.com/go-sql-driver/mysql" | |
"github.com/gorilla/pat" | |
) |
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
source 'https://rubygems.org' | |
gem 'sinatra' | |
gem 'thingiverse' | |
gem 'pry' |
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
<form action="/" method="POST"> | |
<h3> Messaggio </h3> | |
<input type="text" name="message" value=<%= params[:message] %>> | |
<h3> Email </h3> | |
<input type="text" name="email" value=<%= params[:email] %>> | |
<input type="submit" value="Inserisci "> | |
</form> | |
<% @messages.each do |m| %> |
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
# encoding: utf-8 #per caratteri italiani | |
class MotherNature | |
attr_accessor :animals | |
def initialize | |
@animals = [] | |
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
class Album | |
attr_accessor :band, :title, :year, :tracks | |
def initialize(title, band, year) | |
@title = title | |
@band = band | |
@year = year | |
@tracks = [] | |
end |
NewerOlder