Skip to content

Instantly share code, notes, and snippets.

View asterite's full-sized avatar

Ary Borenszweig asterite

  • NoRedInk
  • Buenos Aires, Argentina
View GitHub Profile
Curation:
4 - [email protected] at 2015-03-24 13:58:18 UTC: Site 'Buger' changed: 'Ownership' changed from 'FBO' to 'Priv', 'OwnershipDetail' changed from 'Lutheran' to 'Private/FBO', 'PostalAddress' changed from (nothing) to 'Box 204', 'ReceptionRoom' changed from (nothing) to 1, 'ClinicalServices_Gen' changed from (nothing) to ["OPD - Outpatient Services (OPD)", "IMCI - Integrated Management of Childhood Illness (IMCI)", "NCD - Other Non-Communicable Disease Care and Treatment (NCD)", "Nutritional Counseling (NTCNS)", "Minor Surgical Interventions (MNSI)"], 'Waypoint' changed from (nothing) to 'Buger', 'RegistrationStatus' changed from (nothing) to Registered (Reg), 'ConsultationRoom' changed from (nothing) to 1, 'ClinicalServices_Malaria' changed from (nothing) to ["mRDT - Rapid Diagnostic Tests (mRDT)", "First Line Treatment (FLT)"], 'Registrar_ID' changed from (nothing) to '02A006', 'Altitude' changed from (nothing) to 1724, 'DressingRoom' changed from (nothing) to 1, 'ServiceArea' changed from (nothi
[HealthCheck] E | Failed!
[HealthCheck] E | The following libraries have unsafe or unmet dependencies:
[HealthCheck] E | The following binaries have unsafe or unmet dependencies:
--> /opt/crystal/embedded/bin/crystal
[HealthCheck] E | The following libraries cannot be guaranteed to be on target systems:
--> /usr/lib64/libssl.so.10 (0x00007f4d833a2000)
--> /usr/lib64/libcrypto.so.10 (0x00007f4d82fbf000)
--> /lib64/libz.so.1 (0x00007f4d82da8000)
diff --git a/src/commands/command.cr b/src/commands/command.cr
index ebda4f1..70f5360 100644
--- a/src/commands/command.cr
+++ b/src/commands/command.cr
@@ -4,9 +4,12 @@ require "../spec"
module Shards
abstract class Command
- getter :path
- getter :spec_path
require "benchmark/ips"
CONSTANT = %w(foo bar baz)
Benchmark.ips do |x|
x.report("literal") { %w(foo bar baz).include?("foo") }
x.report("constant") { CONSTANT.include?("foo") }
end
# to_unsafe AND avoid creating Chars
class URL
property scheme, path, host
property non_relative_flag
end
class Parser
property url
require "base64"
module Kemal::Middleware
# This middleware adds HTTP Basic Auth support to your application.
# Returns 401 "Unauthorized" with wrong credentials.
#
# auth_handler = Kemal::Middleware::HTTPBasicAuth.new("username", "password")
# Kemal.config.add_handler auth_handler
#
class HTTPBasicAuth < HTTP::Handler
diff --git a/src/beryl/router.cr b/src/beryl/router.cr
index 0e8eaa1..f46f312 100644
--- a/src/beryl/router.cr
+++ b/src/beryl/router.cr
@@ -68,7 +68,7 @@ module Beryl
if action.responds_to?(:call)
params = result.params
- combine_query_params request, params
+ # combine_query_params request, params
require "spec"
class Counter(B)
include Iterator(Array(B))
def initialize(@size : Int, @range : Range(B, E))
@array = Array.new(@size, @range.begin)
@stop = false
end
# Just a single definite article ("the")
definite_articles = %w(la)
# No indefinite articles ("a", "an")
indefinite_articles = nil
# Numbers can be combined, so "twenty three" is "du-dek tri" (2*10 + 3)
numbers = %w(nulo unu du tri kvar kvin sep sep ok nau dek cent mil miliono)
# I, you, he, she, ...
#include <stdio.h>
#include <sys/utsname.h>
int main() {
printf("%lu\n", sizeof(struct utsname));
return 0;
}