I hereby claim:
- I am watzon on github.
- I am watzon (https://keybase.io/watzon) on keybase.
- I have a public key ASAaZc4seSN-ph2udQzAl_qP_oBugNBvq57A5mKu5qQh1go
To claim this, I am signing this object:
class Organization < BaseModel | |
table :organizations do | |
column name : String | |
column email : String | |
column profile_image_url : String? | |
column description : String? | |
column github_username : String? | |
column gitlab_username : String? | |
column twitter_username : String? |
name: tourmaline-bot | |
version: 0.1.0 | |
authors: | |
- Your Mane <[email protected]> | |
crystal: 0.28.0 | |
dependencies: | |
tourmaline: |
class CreateOrganizationMembers::V20190614161024 < Avram::Migrator::Migration::V1 | |
def migrate | |
create :organization_member do | |
add_belongs_to user : User, on_delete: :cascade | |
add_belongs_to organization : Organization, on_delete: :cascade | |
add can_add_shards : Bool | |
add can_delete_shards : Bool | |
add can_edit_shards : Bool | |
add can_edit_info : Bool |
abstract class DecoratorBase | |
private macro decorate(ident, name = nil) | |
@_{{ ident.id.stringify.downcase.id }} : {{ ident.id }} | |
forward_missing_to @_{{ ident.id.stringify.downcase.id }} | |
def initialize(@_{{ ident.id.stringify.downcase.id }} : {{ ident.id }}) | |
end | |
end |
require "http/client" | |
require "openssl" | |
module NotPwnedValidation | |
def validate_not_in_hibp | |
password.value.try do |value| | |
hash = get_sha1_hash(value).upcase | |
first_five = hash[0...5] | |
response = HTTP::Client.get("https://api.pwnedpasswords.com/range/" + first_five) | |
hashes = response.body.split("\r\n") |
import { Application } from 'stimulus' | |
import PasswordController from './controllers/password_controller' | |
const application = Application.start() | |
application.register("password", PasswordController) |
I hereby claim:
To claim this, I am signing this object:
# This example will throw an error at compile time | |
# allowing you to catch it sooner and fix it | |
arr = [] of Int32 | |
def sum(arr) | |
arr.reduce(0) { |acc,i| acc + i } | |
end | |
# Works just fine |
# This example throws a runtime error. | |
# Yes. This is intentional. | |
arr = [] | |
def sum(arr) | |
arr.reduce(0) { |acc,i| acc + i } | |
end | |
# Works just fine |
# A very basic HTTP server | |
require "socket" | |
server = TCPServer.new("localhost", 8080) | |
puts "Listening on http://localhost:8080" | |
loop do | |
socket = server.accept | |
request = socket.gets | |