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 React, { useRef } from 'react'; | |
import { Editor } from '@tinymce/tinymce-react'; | |
export default function App() { | |
const editorRef = useRef(null); | |
const log = () => { | |
if (editorRef.current) { | |
console.log(editorRef.current.getContent()); | |
} | |
}; |
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 ps -q | xargs -n 1 docker inspect --format '{{ .Name }} {{range .NetworkSettings.Networks}} {{.IPAddress}}{{end}}' | sed 's#^/##'; |
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
async lastTransactions(req, res) { | |
const { authorization, user } = req.headers; | |
const { id , page } = req.params; | |
if(authorization != SECRETKEY && !id){ | |
return res.status(400).json({"message" : "bad request"}); | |
} | |
if (!mongoose.Types.ObjectId.isValid(id)){ |
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
server { | |
listen 80; | |
server_name jaccon.com.br; | |
location / { | |
return 302 https://novosite-jaccon.com.br$request_uri; | |
tcp_nodelay on; | |
} | |
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
# @Jaccon Settings | |
SPACESHIP_PROMPT_ORDER=( | |
user # Username section | |
dir # Current directory section | |
host # Hostname section | |
git # Git section (git_branch + git_status) | |
hg # Mercurial section (hg_branch + hg_status) | |
exec_time # Execution time | |
line_sep # Line break | |
vi_mode # Vi-mode indicator |
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
# Simple Script to detect faces on Images using OpenCV | |
import cv2 | |
import sys | |
# Get user supplied values | |
imagePath = sys.argv[1] | |
cascPath = "./models/haarcascade_frontalface_default.xml" | |
# Create the haar cascade | |
faceCascade = cv2.CascadeClassifier(cascPath) |
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' | |
volumes: | |
dados: | |
services: | |
db: | |
image: postgres:9.6 | |
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
module.exports = { | |
"apiHttpPort" : "3333", | |
"GoogleHomeIp" : "192.168.1.40", | |
"Authorization" : "likaek3iugh7Apei0ohz3jee7raet3Kah6ImaeTaiy0xe7Mie6edie3ahthi", | |
} |
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 (filter_var($address, FILTER_VALIDATE_EMAIL)) { | |
echo "$address"; | |
} |
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
// @flow | |
import React, { Component } from "react"; | |
import { View, Text } from "react-native"; | |
import moment from "moment"; | |
import 'moment/locale/pt-br'; | |
export default class TimeAgo extends Component { | |
props: { | |
time: string, | |
interval?: number, |
NewerOlder