-
Pra começar, atualize o sistema:
sudo apt update sudo apt upgrade -y
-
Intale o MariaDB:
sudo apt install -y mariadb-server sudo mysql_secure_installation
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Document</title> | |
<meta name="color-scheme" content="dark light"> | |
<style> | |
* { | |
font-size: 32px; |
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 Point { | |
constructor( | |
public x: number, | |
public y: number, | |
) {} | |
serialize(): any { | |
return {__type: this.constructor.name, x: this.x, y: this.y} | |
} | |
toString() { | |
return `I'm a point: ${this.x}, ${this.y}` |
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
@use "sass:color"; | |
@use "sass:list"; | |
@use "sass:math"; | |
@use "sass:meta"; | |
// Create a list of numbers | |
@function range($from, $to, $step: 1) { | |
// validation | |
@if meta.type-of($from) != "number" { | |
@error "$from must be a number."; |
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
type SuspendStatus = "pending" | "success" | "error"; | |
export function suspend<T>(promise: Promise<T>) { | |
let result: T; | |
let error: Error; | |
let status: SuspendStatus = "pending"; | |
let suspender = promise.then( | |
(r) => { | |
status = "success"; | |
result = r; |
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
<script> | |
const forms = Array.from(document.querySelectorAll("form")) | |
// disable browser validation | |
forms.forEach(el => el.noValidate = true) | |
// add unsaved data prompt | |
let unsaved = false; | |
window.addEventListener("beforeunload", (e) => { | |
if (unsaved) { |
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
# IMPORTANT: | |
# Dont forget to to replace the INSTANCE_NAME for the name | |
# of the instance we created on step 2 | |
steps: | |
- name: gcr.io/cloud-builders/docker | |
args: | |
- build | |
- '-t' |
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
<?php | |
/** | |
* common settings for wp-config | |
*/ | |
// dont try to connect via ftp for updates | |
define( 'FS_METHOD', 'direct' ); | |
// force urls |
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
# EditorConfig is awesome: http://EditorConfig.org | |
# top-most EditorConfig file | |
root = true | |
[*] | |
charset = utf-8 | |
end_of_line = lf | |
insert_final_newline = true | |
indent_style = space |
NewerOlder