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
#!/usr/bin/env python3 | |
""" | |
First, you'll need the following repos checked out side by side: | |
src (name doesn't matter) | |
|-- api https://github.com/temporalio/api/ | |
|-- api-go https://github.com/temporalio/api-go/ | |
|-- sdk-go https://github.com/temporalio/sdk-go/ | |
\-- temporal https://github.com/temporalio/temporal/ |
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
let mut component = Component::new(); | |
component.section(&ModuleSection(&module)); | |
let mut names = ComponentNameSection::new(); | |
let mut func_names = NameMap::new(); | |
func_names.append(0, "main"); | |
names.core_funcs(&func_names); | |
names.funcs(&func_names); | |
let mut instance_names = NameMap::new(); | |
instance_names.append(0, "main"); |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
defmodule Auth do | |
## IMPERATIVE SHELL | |
def login(email, input_password) do | |
with {:ok, user} <- UserRepo.find_by_email(email), | |
{:allowed, true} <- {:allowed, is_allowed(user, input_password)} do | |
UserRepo.update_last_login_date(user, DateTime.utc_now()) | |
{:ok, user} | |
else | |
_ -> :error | |
end |
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
defmodule Auth do | |
def login(email, password) do | |
case UserRepo.find_by_email(email) do | |
{:ok, user} -> | |
password_hash = BCrypt.hash(password) | |
cond do | |
user.hash != hash -> :error | |
user.active == false -> :error | |
user.deleted_at != nil -> :error | |
true -> |
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
defmodule GoogleAppEngine do | |
def google_cloud_project() do | |
System.get_env("GCLOUD_PROJECT", | |
System.fetch_env!("GOOGLE_CLOUD_PROJECT")) | |
end | |
def google_app_engine_service() do | |
System.fetch_env!("GAE_SERVICE") | |
end |
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
#!/usr/bin/env bash | |
weeks=90 | |
echo "all" | |
echo "java" | |
echo "groovy" | |
echo "js" | |
echo "specs" |
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
ab | |
bei | |
da | |
deshalb | |
ein | |
für | |
haben | |
hier | |
ich | |
ja |
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
#!/bin/bash | |
VERSION_URL="https://appengine.google.com/api/updatecheck" | |
VERSION=$(echo $(curl ${VERSION_URL}) | sed -E 's/release: \"(.+)\"(.*)/\1/g') | |
ARCH="386" | |
if [[ `uname -a` == *x86_64* ]] | |
then | |
ARCH="amd64" | |
fi |
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
def IDEA_MODULE_NAME = 'mymodule' | |
def IDEA_ARTIFACT_NAME = 'myproject' | |
def artifactManager = xmlFile.asNode().component.find { it.@name == 'ArtifactManager' } as Node | |
if (artifactManager) { | |
Node artifact = artifactManager.artifact.find { it.@type == 'exploded-war' } | |
if (artifact) | |
artifactManager.remove(artifact) | |
} else { | |
artifactManager = xmlFile.asNode().appendNode('component', [name: 'ArtifactManager']); |
NewerOlder