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
sudo openssl pkcs12 -export -in /etc/letsencrypt/live/domain.com/fullchain.pem -inkey /etc/letsencrypt/live/domain.com/privkey.pem -out domain.com.pfx |
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
private static ISessionFactory CreateSessionFactory() | |
{ | |
var rawConfig = new NHibernate.Cfg.Configuration(); | |
rawConfig.SetNamingStrategy(new PostgreSqlNamingStrategy()); | |
return Fluently.Configure(rawConfig) | |
.Database(PostgreSQLConfiguration.Standard | |
.ConnectionString("<connection string>") | |
.Dialect<PostgreSQL82Dialect>().ShowSql()) | |
.Mappings(m => |
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
public class PostgresNamingStrategy : INamingStrategy | |
{ | |
public string ClassToTableName(string className) | |
{ | |
return DoubleQuote(className); | |
} | |
public string PropertyToColumnName(string propertyName) | |
{ | |
return DoubleQuote(propertyName); |
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
class Employee { | |
final int id; | |
final String name; | |
final String cpf; | |
double _payment; | |
bool _profile = false; // if the employee is a boss | |
Employee(this.id, this.name, this.cpf); |
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
import 'dart:io'; | |
import "package:http/http.dart" as http; | |
import "package:html/parser.dart" show parse; | |
import 'package:meta/meta.dart'; | |
const url = "https://www.bibliaonline.com.br"; | |
void main() async { | |
var translations = await getTranslations(); |
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
import 'package:flutter/material.dart'; | |
void main() async { | |
runApp( | |
MaterialApp( | |
debugShowCheckedModeBanner: false, | |
home: Scaffold( | |
body: ListView( | |
padding: EdgeInsets.only(top: 20.0), | |
children: <Widget>[ |
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
sudo apt install mysql_server | |
sudo apt install mysql_client | |
sudo mysql -u root | |
DROP USER 'root'@'localhost'; | |
CREATE USER 'root'@'%' IDENTIFIED BY ''; | |
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' WITH GRANT OPTION; | |
FLUSH PRIVILEGES; |
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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
typedef struct | |
{ | |
int peso; | |
int custo; | |
} Objeto; |
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
cd ~ | |
apt update | |
apt install build-essential subversion cmake xorg-dev libgl1-mesa-dev libglu-dev libpng-dev libz-dev libcurl4-gnutls-dev libfreetype6-dev libjpeg-dev libvorbis-dev libopenal-dev libphysfs-dev libgtk2.0-dev libasound-dev libflac-dev libdumb1-dev | |
wget https://github.com/liballeg/allegro5/releases/download/5.2.4.0/allegro-5.2.4.0.tar.gz | |
tar -xvzf allegro-5.2.4.0.tar.gz | |
cd allegro-5.2.4.0 | |
mkdir build | |
cd build | |
cmake .. -DCMAKE_INSTALL_PREFIX=/usr | |
make |
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
#include <stdio.h> | |
#include <stdlib.h> | |
typedef struct arvore { | |
int info; | |
struct arvore *esq; | |
struct arvore *dir; | |
} Arvore; | |
Arvore *criar(Arvore *arvore, FILE *arq) |