# Install package
$ npm install -g create-react-native-web-app
# Run create-react-native-web-app <project-directory>
$ create-react-native-web-app myApp
# cd into your <project-directory>
$ cd myApp
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
trustedIP="1.2.3.4/32" | |
cat <<- EOF > /etc/iptables/rules.v4 | |
# Generated by iptables-save v1.8.7 on Wed Mar 29 14:37:32 2023 | |
*filter | |
:INPUT DROP [0:0] | |
:FORWARD DROP [0:0] | |
:OUTPUT ACCEPT [0:0] | |
-A INPUT -i lo -j ACCEPT | |
-A INPUT -p tcp -m tcp --dport 22 -j ACCEPT |
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 | |
$builder = MyModel::where('active', 1); | |
$query = str_replace(array('?'), array('\'%s\''), $builder->toSql()); | |
$query = vsprintf($query, $query->getBindings()); | |
dd($query); |
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
body { | |
font-family: "Nunito"; | |
font-size: 16px; | |
} | |
div.container { | |
width: 78%; | |
margin: 0 auto; | |
} | |
form div, form label, form input { | |
display:block; |
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
<h2>Criar Contato</h2> | |
<div> | |
<form method="post"> | |
<div> | |
<label>Nome</label> | |
<input type="text"> |
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
Cities::create([ | |
'cod' => '11', | |
'uf_name' => 'Rondônia', | |
'city' => "Alta Floresta D'Oeste", | |
]); | |
Cities::create([ | |
'cod' => '11', | |
'uf_name' => 'Rondônia', | |
'city' => "Ariquemes", |
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
const options = { year: "numeric", month: "long", day: "numeric" }; | |
const date = new Date(2020, 11, 31) // 2020-12-31T03:00:00.000Z | |
console.log(date.toLocaleDateString("pt-br", options)) | |
// 31 de dezembro de 2020 | |
console.log(date.toLocaleDateString("pt-br", { ...options, month: 'numeric'})) | |
// 31/12/2020 | |
const regex = /^([0-9]{4})[-](0[1-9]|1[0-2])[-](0[0-9]|1[0-9]|2[0-9]|3[0-1])/gm | |
const dateRx = new Date(2020, 11, 31) // 2020-12-31T03:00:00.000Z |
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 | |
### Variáveis | |
PROGRAMAS_APT=( | |
git | |
git-flow | |
google-chrome-stable | |
deepin-terminal | |
deepin-screen-recorder | |
gnome-tweak-tool |
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
import mysql.connector | |
from mysql.connector import errorcode | |
config = { | |
'user': 'root', | |
'password': '', | |
'host': 'localhost', | |
'database': 'acme' | |
} |
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 | |
LANGUAGES="en_US pt_BR" | |
# production or developer | |
ENVIRONMENT="production" | |
COMPOSER=$(which composer) | |
PHP=$(which php) | |
ROOT=$(pwd) |
NewerOlder