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
if [[ $(id -u) -ne 0 ]] | |
then echo "Por favor, executar como root" | |
exit 1 | |
fi | |
apt-get update | |
apt-get install -y docker.io | |
apt-get install -y apt-transport-https ca-certificates curl | |
curl -fsSLo /usr/share/keyrings/kubernetes-archive-keyring.gpg https://packages.cloud.google.com/apt/doc/apt-key.gpg | |
echo "deb [signed-by=/usr/share/keyrings/kubernetes-archive-keyring.gpg] https://apt.kubernetes.io/ kubernetes-xenial main" | sudo tee /etc/apt/sources.list.d/kubernetes.list | |
apt-get update |
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
pragma solidity 0.5.3; | |
contract HelloWorld{ | |
string public text; | |
uint public number; | |
address public userAddress; | |
bool public answer; | |
mapping (address => uint) public hasInteracted; | |
function setText(string memory myText) public { |
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
docker stop postgres redis elastcsearch | |
docker container rm postgres redis elastcsearch | |
docker run --name postgres -e POSTGRES_PASSWORD=postgres -d -v="pgdata:/var/lib/postgresql/data" -p 5432:5432 postgres | |
docker run --name redis -d -p 6379:6379 -p 6380:6379 redis | |
docker run --name elastcsearch -d -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" docker.elastic.co/elasticsearch/elasticsearch:6.7.2 | |
docker run -e "ACCEPT_EULA=Y" -e "SA_PASSWORD=aaabbbccc1234" -p 1433:1433 -d mcr.microsoft.com/mssql/server:2019-CU15-ubuntu-20.04 => levantar sql | |
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) | |
{ | |
optionsBuilder.UseSqlServer(@"Server=localhost,1433;Database=HereApp;User Id=sa;Password=aaabbbccc1234;"); |
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
#COPIE O SCRIPT COLA DENTRO DE install.sh | |
#JOGA PARA O DOCUMENTO SO | |
#chmod +777 install.sh | |
#./install.sh | |
# RODAR COMO ROOT OU SUDO | |
if [[ $(id -u) -ne 0 ]] | |
then echo "Por favor executar como root" | |
exit 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
array.each do |x| | |
puts '----------iniciando novo processo------------' | |
thread << Thread.new do | |
begin | |
Timeout::timeout(60 * 10) do | |
executar_processo(malha) | |
end | |
rescue | |
end | |
end |
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
#instalando docker | |
sudo snap install docker | |
sudo docker ps | |
sudo groupadd docker | |
sudo usermod -aG docker ${USER} | |
su -s ${USER} | |
docker ps | |
sudo docker pull postgres | |
docker images |
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
# Redis configuration file example. | |
# | |
# Note that in order to read the configuration file, Redis must be | |
# started with the file path as first argument: | |
# | |
# ./redis-server /path/to/redis.conf | |
# Note on units: when memory size is needed, it is possible to specify | |
# it in the usual form of 1k 5GB 4M and so forth: | |
# |
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
[Route("api/[controller]")] | |
[ApiController] | |
public class WidgetController : ControllerBase | |
{ | |
// GET api/values | |
[EnableCors("AnotherPolicy")] | |
[HttpGet] | |
public ActionResult<IEnumerable<string>> Get() | |
{ | |
return new string[] { "green widget", "red 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
<style lang="scss"> | |
.rotate-in { | |
opacity: 0; | |
animation: rotate 500ms linear; | |
animation-fill-mode: forwards; | |
@for $i from 1 through 12 { | |
&:nth-child(#{$i}) { | |
animation-delay: $i * 50ms; | |
} | |
} |
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
using System.Collections.Generic; | |
using System; | |
using System.Linq; | |
public class Program | |
{ | |
public static void Main() | |
{ | |
Arvore obj = new Arvore(); | |
obj.add("a","b"); |
NewerOlder