$ docker
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
def main(): | |
print("Main function") | |
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
version: '3' | |
networks: | |
solr-network: | |
driver: bridge | |
services: | |
solr: | |
image: bitnami/solr:latest | |
networks: | |
- solr-network | |
ports: |
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
# Ask for the user password | |
# Script only works if sudo caches the password for a few minutes | |
sudo true | |
# Install kernel extra's to enable docker aufs support | |
# sudo apt-get -y install linux-image-extra-$(uname -r) | |
# Add Docker PPA and install latest version | |
# sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9 | |
# sudo sh -c "echo deb https://get.docker.io/ubuntu docker main > /etc/apt/sources.list.d/docker.list" |
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
version: '3' | |
services: | |
mongodb: | |
image: 'bitnami/mongodb:latest' | |
ports: | |
- "27017:27017" | |
volumes: | |
- /home/matheuschimelli7/mongodb-persistence:/bitnami | |
environment: |
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
version: '3' | |
services: | |
solr: | |
image: solr | |
ports: | |
- "8983:8983" | |
volumes: | |
- data:/home/matheuschimelli7/sorl-persistence | |
entrypoint: | |
- docker-entrypoint.sh |
Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...
// see: https://github.com/chadoe/docker-cleanup-volumes
$ docker volume rm $(docker volume ls -qf dangling=true)
$ docker volume ls -qf dangling=true | xargs -r docker volume rm
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
function traduz(title, fromLang, toLang){ | |
LanguageApp.translate(title, fromLang, toLang); | |
} | |
function g1() { | |
var array = []; | |
var url = 'https://g1.globo.com/rss/g1'; | |
var feed = UrlFetchApp.fetch(url).getContentText(); | |
feed = XmlService.parse(feed); | |
var items = feed.getRootElement().getChild("channel").getChildren("item"); |
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
(async () => { | |
if (!("mediaDevices" in navigator) || !("RTCPeerConnection" in window)) { | |
alert("Sorry, your browser does not support WebRTC."); | |
return; | |
} | |
const stream = await navigator.mediaDevices.getUserMedia({video:true, audio:true}); | |
yourVideo.srcObject = stream; | |
const configuration = { | |
iceServers: [{urls: "stun:stun.1.google.com:19302"}] |
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
<div id="app"></div> | |
<script | |
crossorigin | |
src="https://unpkg.com/react@16/umd/react.development.js" | |
></script> | |
<script | |
crossorigin | |
src="https://unpkg.com/react-dom@16/umd/react-dom.development.js" | |
></script> | |
<script src="https://unpkg.com/babel-standalone@6/babel.min.js"></script> |
OlderNewer