This file contains 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
sudo curl -sfL https://get.k3s.io | INSTALL_K3S_EXEC='server --write-kubeconfig-mode="644"' sh - | |
cp /etc/rancher/k3s/k3s.yaml ~/.kube/config && sed -i "s,127.0.0.1,$(hostname -I | awk '{print $1}'),g" ~/.kube/config | |
curl -L -s https://github.com/derailed/k9s/releases/download/v0.24.15/k9s_Linux_x86_64.tar.gz | tar xvz -C /tmp | |
sudo mv /tmp/k9s /usr/bin | |
rm -rf k9s_Linux_x86_64.tar.gz | |
export BIONIC_VERSION=1.6.35 | |
curl -OL https://github.com/bionic-gpt/bionic-gpt/releases/download/v${BIONIC_VERSION}/bionic-cli-linux && chmod +x ./bionic-cli-linux && sudo mv ./bionic-cli-linux /usr/local/bin/bionic | |
bionic install --pgadmin |
This file contains 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
class Bitcoins::Index < BrowserAction | |
get "/bitcoins" do | |
addresses = populate_balances(KeyPairQuery.new.user_id(current_user.id)) | |
render IndexPage, addresses: addresses, form: KeyPairForm.new | |
end | |
private def populate_balances(key_pair_query) |
This file contains 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
// Lucky generates 3 folders to help you organize your CSS: | |
@import "~normalize-scss/sass/normalize/import-now"; | |
@import "variables/colors"; | |
@import "components/authentication"; | |
body { | |
font-family: Sans-Serif; | |
} |
This file contains 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
.authentication { | |
background-color: $color-grey; | |
h1 { | |
text-align: center; | |
text-transform: uppercase; | |
color: $color-dark-grey; | |
} |
This file contains 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
$color-white: white; | |
$color-grey: #fafafa; | |
$color-dark-grey: #333; |
This file contains 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 GuestLayout | |
# Edit shared layout code in src/components/shared/layout.cr | |
include Shared::Layout | |
def render | |
html_doctype | |
html lang: "en" do | |
shared_layout_head |
This file contains 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
class SignIns::NewPage < GuestLayout | |
needs form : SignInForm | |
def content | |
h1 "Sign In" | |
render_sign_in_form(@form) | |
end | |
private def render_sign_in_form(f) | |
form_for SignIns::Create do |
This file contains 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
class CreateKeyPair::V20180810125258 < LuckyMigrator::Migration::V1 | |
def migrate | |
create :key_pairs do | |
add user_id : Int32 | |
add public_key : String | |
add private_key : String | |
end | |
end | |
def rollback |
This file contains 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
LuckyRecord::Repo.configure do | |
if Lucky::Env.production? | |
settings.url = ENV.fetch("DATABASE_URL") | |
else | |
settings.url = ENV["DATABASE_URL"]? || | |
LuckyRecord::PostgresURL.build( | |
hostname: "localhost", | |
database: database, | |
username: "ubuntu", | |
password: "password") |
This file contains 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
github: onchain/onchain-shard |
NewerOlder