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
#!/bin/sh | |
set -e | |
set -x | |
# Adapted from https://www.daemonology.net/blog/2019-02-16-FreeBSD-ZFS-AMIs-now-available.html | |
# Note: You need to run this on an instance with read/write access to Google Compute | |
# Alternatively, you can run the gcloud commands from somewhere with privileges | |
disk=da1 |
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
%{ | |
where: %{ | |
OR: [ | |
%{ | |
description: "description", | |
OR: [ | |
%{ | |
test: "hmmm" | |
}, | |
%{ |
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
defmodule Nomure.Database.Coder.GraphValue do | |
@moduledoc """ | |
A module that specifies how the data is serialized, pretty much as the `FDB.Coder.Dynamic` but without | |
the need of specifing the type | |
""" | |
use FDB.Coder.Behaviour | |
import Nomure.Database.Coder.Guards, | |
only: [is_int: 1, is_long: 1, is_short: 1, is_long_string: 1, is_byte: 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
// Main | |
package com.first; | |
public class Main { | |
public static void main(String[] args) { | |
HangmanConsole console = new HangmanConsole(); | |
console.startGame(); |
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
package com.first; | |
import java.io.BufferedReader; | |
import java.io.FileReader; | |
import java.io.IOException; | |
import java.util.Collections; | |
import java.util.Comparator; | |
import java.util.HashMap; | |
import java.util.Map; |
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
/* Source from: https://github.com/Astrocoders/reform I edited it to handle the onChange events and validation */ | |
type action = | |
| HandleChange((string, string)) | |
| HandleSubmit; | |
type validation = | |
| Required | |
| MinLength(int) | |
| MaxLength(int) | |
| Between(int, int) |
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
defmodule Search.Searcher do | |
# Score consts | |
@sequential_bonus 15 # bonus for adjacent matches | |
@separator_bonus 30 # bonus if match occurs after a separator | |
@camel_bonus 30 # bonus if match is uppercase and prev is lower | |
@first_letter_bonus 15 # bonus if the first letter is matched | |
@leading_letter_penalty -5 # penalty applied for every letter in str before the first match | |
@max_leading_letter_penalty -15 # maximum penalty for leading letters |