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
postgres=# insert into customers (id, first_name, last_name, email) values (1005, 'foo', 'bar', '[email protected]'); | |
INSERT 0 1 | |
postgres=# update customers set first_name = 'egg' where id = 1005; | |
UPDATE 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
mod blog { | |
pub struct Post { | |
state: Option<Box<dyn State>>, | |
content: String, | |
} | |
impl Post { | |
pub fn new() -> Post { | |
Post { | |
state: Some(Box::new(Draft {})), |
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 main | |
import ( | |
"context" | |
"fmt" | |
"time" | |
"github.com/Decentr-net/ariadne" | |
decentr "github.com/Decentr-net/decentr/app" | |
) |
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
version: '2.1' | |
services: | |
postgresql: | |
image: postgres:11-alpine | |
restart: always | |
ports: | |
- 5432:5432 | |
environment: | |
POSTGRES_DB: db |
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
version: '2.1' | |
services: | |
postgresql: | |
image: postgres:11-alpine | |
restart: always | |
ports: | |
- 5432:5432 | |
environment: | |
POSTGRES_DB: db |
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 ironsource | |
import ( | |
"encoding/csv" | |
"encoding/json" | |
"fmt" | |
"github.com/pkg/errors" | |
"io" | |
"io/ioutil" | |
"net/http" |
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
#!/usr/bin/env bash | |
# jq and gcloud are prerequisites | |
# voices: https://cloud.google.com/text-to-speech/docs/voices | |
export GOOGLE_APPLICATION_CREDENTIALS="gcloud.json" # Create your own | |
accessToken=$(gcloud auth application-default print-access-token) | |
translate() { | |
curl --silent -H "Authorization: Bearer "${accessToken} \ |
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
--- | |
- hosts: nats | |
sudo: yes | |
tasks: | |
- name: create nats directory | |
file: path=/srv/nats/bin state=directory | |
- name: unarchive gnats | |
unarchive: |
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 services | |
import javax.inject.Singleton | |
import play.api.libs.ws._ | |
import play.api.Play.current | |
import scala.concurrent.Future | |
import scala.concurrent.ExecutionContext.Implicits.global | |
@Singleton |
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 services | |
import play.api.libs.ws._ | |
import play.api.libs.concurrent.Execution.Implicits.defaultContext | |
import scala.concurrent.Future | |
class TimezoneProvider { |