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
| # StateMachineHistoryLabel.gd | |
| # Debug UI for AnimationNodeStateMachinePlayback | |
| # Horizontal rolling history, arrows, newest entry pulse | |
| class_name StateMachineHistoryLabel | |
| extends Control | |
| @export var animation_tree: AnimationTree | |
| @export var state_machine_path: StringName | |
| @export var max_entries: int = 8 |
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
| #include "marching-squares.hh" | |
| #include "point.hh" | |
| #include "polygon.hh" | |
| #include "douglas-peucker.hh" | |
| #include <ps/canvas/canvas.hh> | |
| #include <cstring> | |
| #include <vector> |
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
| Copyright 2016 Mike Owens | |
| Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation | |
| files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, | |
| modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the | |
| Software is furnished to do so, subject to the following conditions: | |
| The above copyright notice and this permission notice shall be included in all copies or substantial portions of the | |
| Software. |
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
| { | |
| "$schema": "http://json-schema.org/draft-07/schema", | |
| "title": "RuboCop configuration schema", | |
| "description": "Schema for RuboCop configuration files (e.g. .rubocop.yml), intended for helping IDEs provide autocompletion and validation.", | |
| "type": "object", | |
| "additionalProperties": false, | |
| "definitions": { | |
| "inherit_mode": { | |
| "type": "object", | |
| "minProperties": 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
| require "rack/utils" | |
| # Rails < 4.1 serialized sessions with Marshal, which could distinguish "html_safe" flash strings | |
| # from unsafe strings because it encoded actual ActiveSupport::SafeBuffer objects. So when the | |
| # flash message came back from the client, its "safe" status was preserved, and it was rendered | |
| # correctly under both circumstances. | |
| # | |
| # This same "magic" ability is also why Rails moved away from it: multiple CVEs due to arbitrary | |
| # object creation. But regardless, that was a *really* nice trick. | |
| # |
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 "shellwords" | |
| def terminal_width | |
| %x(tput cols).chomp.to_i | |
| rescue StandardError | |
| 80 | |
| end | |
| def sql_table_command(model_class) | |
| table_name = model_class.table_name |
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
| # Tries to find a parent directory containing a file: "$1" | |
| find-up() { | |
| local path=$(pwd) | |
| while [[ -n "$path" && ! -e "$path/$1" ]]; do | |
| path=${path%/*} | |
| done | |
| echo "$path" | |
| } | |
| try-binstub() { |
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
| # Extracted from the following library | |
| # http://facstaff.unca.edu/mcmcclur/GoogleMaps/EncodePolyline/ | |
| #-- | |
| # Utility for creating Google Maps Encoded GPolylines | |
| # License: You may distribute this code under the same terms as Ruby itself | |
| # Author: Joel Rosenberg | |
| class DouglasPeucker | |
| # The minimum distance from the line that a point must exceed to avoid | |
| # elimination under the DP Algorithm. |
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 MarchingSquares | |
| STATE = { "0000" => :r, "1100" => :r, "0011" => :l, "1110" => :r, | |
| "0100" => :r, "1000" => :u, "1011" => :u, "1001" => :u, | |
| "0101" => :d, "1010" => :u, "0111" => :l, "0110" => :l, | |
| "0001" => :d, "0010" => :l, "1101" => :d, "1111" => :r } | |
| def self.find_shape(grid, w, h) | |
| edge_pos = grid.index('1') | |
| return nil if edge_pos.nil? |
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
| /**************************************************************************** | |
| Copyright (c) 2012 cocos2d-x.org | |
| Copyright (c) 2012 Mike Owens <mike@filespanker> | |
| Copyright (c) 2010 Sangwoo Im | |
| http://www.cocos2d-x.org | |
| Permission is hereby granted, free of charge, to any person obtaining a copy | |
| of this software and associated documentation files (the "Software"), to deal | |
| in the Software without restriction, including without limitation the rights |
NewerOlder