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
#![warn(clippy::all, clippy::pedantic)] | |
use bracket_lib::prelude::*; | |
const SCREEN_WIDTH: i32 = 80; | |
const SCREEN_HEIGHT: i32 = 50; | |
const FRAME_DURATION: f32 = 75.0; | |
const DRAGON_FRAMES: [u16; 6] = [64, 1, 2, 3, 2, 1]; | |
struct Obstacle { | |
x: i32, |
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
#!/usr/bin/env node | |
import 'source-map-support/register' | |
import * as cdk from '@aws-cdk/core' | |
import { MyLambdaStack } from '../lib/my-lambda-stack' | |
import { ErrorReportingStack } from '../lib/error-reporting-stack' | |
const app = new cdk.App() | |
const errorReportingStack = new ErrorReportingStack(app, 'ErrorReportingStack', { | |
appName: 'my-app', |
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
import * as cdk from '@aws-cdk/core'; | |
import * as s3 from '@aws-cdk/aws-s3'; | |
import * as lambda from '@aws-cdk/aws-lambda'; | |
export interface AppStackProps extends cdk.StackProps { | |
lambdaParamName: string; | |
} | |
export class AppStack extends cdk.Stack { | |
constructor(scope: cdk.Construct, id: string, props: AppStackProps) { |
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
class Parser | |
def parse expression | |
tokenizer = Tokenizer.new expression | |
first_value = read_next_number tokenizer | |
while tokenizer.look_next_token | |
operator = read_next_operator tokenizer | |
second_value = read_next_number tokenizer | |
first_value = operate(first_value, operator, second_value) | |
end | |
first_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
class User < ActiveRecord::Base | |
has_many :memberships, inverse_of: :user | |
end | |
# ha anche il flag owner | |
class Membership < ActiveRecord::Base | |
belongs_to :user, inverse_of: :memberships | |
belongs_to :group, inverse_of: :memberships | |
end |
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
NoMethodError: undefined method `url_options' for #<Module:0x007ffe03407410> | |
File "/app/vendor/bundle/ruby/2.2.0/gems/actionpack-4.2.0/lib/action_dispatch/routing/route_set.rb" line 271 in call | |
File "/app/vendor/bundle/ruby/2.2.0/gems/actionpack-4.2.0/lib/action_dispatch/routing/route_set.rb" line 222 in call | |
File "/app/vendor/bundle/ruby/2.2.0/gems/actionpack-4.2.0/lib/action_dispatch/routing/route_set.rb" line 334 in block (2 levels) in define_url_helper | |
File "/app/vendor/bundle/ruby/2.2.0/gems/actionpack-4.2.0/lib/action_dispatch/routing/routes_proxy.rb" line 31 in new_user_confirmation_path | |
File "/app/vendor/bundle/ruby/2.2.0/gems/devise-3.4.1/lib/devise/controllers/url_helpers.rb" line 52 in new_confirmation_path | |
File "/app/app/views/devise/shared/_links.slim", line 11 in _app_views_devise_shared__links_slim__4228686031403603823_70364466969860 | |
File "/app/vendor/bundle/ruby/2.2.0/gems/actionview-4.2.0/lib/action_view/template.rb" line 145 in block in render | |
File "/app/vendor/bundle/ruby/2.2.0/gems/actives |
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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
VAGRANTFILE_API_VERSION = "2" | |
cwd = File.expand_path '../', __FILE__ | |
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
#config.vm.define "#{ENV['VAGRANT_DEFAULT_PROVIDER']}_boot2docker" | |
config.vm.box = "yungsang/boot2docker" |
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
# Original code: https://github.com/baxter/csterrain/blob/master/src/generate_terrain.coffee | |
# | |
# | |
# Generate realistic looking terrain using the [diamond square algorithm](http://en.wikipedia.org/wiki/Diamond-square_algorithm). | |
# | |
#### Generating a height map | |
# The height map is basically an array of numbers, each element represents | |
# a point on a map and each number represents the height of that grid. | |
class @HeightMap |
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
# Original code: https://github.com/baxter/csterrain/blob/master/src/generate_terrain.coffee | |
# | |
# | |
# Generate realistic looking terrain using the [diamond square algorithm](http://en.wikipedia.org/wiki/Diamond-square_algorithm). | |
# | |
#### Generating a height map | |
# The height map is basically an array of numbers, each element represents | |
# a point on a map and each number represents the height of that grid. | |
class @HeightMap |
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
diff --git a/akamai_api.gemspec b/akamai_api.gemspec | |
index 36d81ee..b5eea39 100644 | |
--- a/akamai_api.gemspec | |
+++ b/akamai_api.gemspec | |
@@ -18,7 +18,6 @@ Gem::Specification.new do |gem| | |
gem.required_ruby_version = Gem::Requirement.new(">= 1.9.2") | |
gem.add_dependency 'httparty', '~> 0.13.1' | |
- gem.add_dependency 'activesupport', '>= 2.3.9', '< 5.0' | |
gem.add_dependency 'thor', '>= 0.14.0', '< 2.0' |
NewerOlder