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
| Error in bin/micrate:4: instantiating 'Micrate::Cli:Module#run()' | |
| Micrate::Cli.run | |
| ^~~ | |
| in lib/micrate/src/micrate/cli.cr:89: instantiating 'run_up()' | |
| run_up | |
| ^~~~~~ |
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
| abstract class Transformation(I, O) | |
| def self.transform(input : I) : O | |
| O.new(input) | |
| end | |
| end | |
| macro trans(name, input, output, &block) | |
| class {{name}} < Transformation({{input}}, {{output}}) | |
| class_getter from = {{input}} | |
| class_getter to = {{output}} |
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
| <?xml version="1.0"?> | |
| <!-- | |
| dirlist.xslt - transform nginx's into lighttpd look-alike dirlistings | |
| I'm currently switching over completely from lighttpd to nginx. If you come | |
| up with a prettier stylesheet or other improvements, please tell me :) | |
| --> | |
| <!-- | |
| Copyright (c) 2016 by Moritz Wilhelmy <mw@barfooze.de> |
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
| raspberry pi 0 w: | |
| $ 10.00 | |
| https://www.adafruit.com/product/3400 | |
| lipo shim: | |
| $ 9.95 | |
| https://www.adafruit.com/product/3196 | |
| lipo battery (3.7v 2000mAh): | |
| $ 12.50 |
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
| $ # no cache crystal run | |
| $ rm -rf $(crystal env CRYSTAL_CACHE_DIR)/* | |
| $ time crystal run sample.cr | |
| hello | |
| real 0m1.289s | |
| user 0m1.916s | |
| sys 0m0.375s | |
| $ # cached crystal run |
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
| $ # no cache crystal run | |
| $ rm -rf $(crystal env CRYSTAL_CACHE_DIR)/* | |
| $ time crystal run sample.cr | |
| hello | |
| real 0m1.289s | |
| user 0m1.916s | |
| sys 0m0.375s | |
| $ # cached crystal run |
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
| $ # no cache crystal run | |
| $ rm -rf $(crystal env CRYSTAL_CACHE_DIR)/* | |
| $ time crystal run sample.cr | |
| hello | |
| real 0m1.289s | |
| user 0m1.916s | |
| sys 0m0.375s | |
| $ # cached crystal run |
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
| #!/usr/bin/env ruby | |
| count = 1 | |
| attempts = (ENV['TRAVIS_RETRY'] || 3).to_i | |
| command = ARGV.join(" ") | |
| puts "Attempting to run \"#{command}\". Will retry up to #{attempts} times." | |
| attempts.times do |attempt_number| | |
| attempt_number += 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
| #!/usr/bin/env crystal | |
| class Thread | |
| class MyThread | |
| @thread : LibC::PthreadT | |
| setter proc : Proc(Pointer(Void), Pointer(Void)) | |
| def initialize | |
| @thread = uninitialized LibC::PthreadT | |
| @proc = uninitialized Proc(Pointer(Void), Pointer(Void)) |
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
| macro do_debug(name) | |
| module MyDebug{{name.id}} # use the run macro to md5 the name or something | |
| def name | |
| {{name}} | |
| end | |
| def debug(thing) | |
| puts("#{name}: #{thing}") | |
| end | |
| end | |
| include MyDebug{{name.id}} # use the run macro to md5 the name or something |