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 hudson.model.* | |
import hudson.scm.* | |
import org.jenkinsci.plugins.envinject.EnvInjectJobProperty | |
def Job model = hudson.model.Hudson.instance.getItem("SONAR_TEMPLATE") | |
def EnvInjectJobProperty pModel = model.getProperty(EnvInjectJobProperty.class) | |
println(hudson.model.Hudson.instance.items.size) | |
for (item in hudson.model.Hudson.instance.items) { |
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
mvn -T 1C com.oracle.weblogic:weblogic-maven-plugin:12.2.1-0-0:install -DartifactLocation=Downloads/weblogic/install/fmw_12.1.3.0.0_wls.jar -DresponseFile=Downloads/weblogic/wls_12.1.3 -DinvPtrLoc=/home/tramasoli/dev-setup/wls12130/oraInst.loc |
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
[Unit] | |
Description=Docker Socket for the API | |
[Socket] | |
ListenStream=2375 | |
BindIPv6Only=both | |
Service=docker.service | |
[Install] | |
WantedBy=sockets.target |
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
""" | |
... some code | |
""" | |
import socket | |
HOSTNAME=socket.gethostname() | |
""" | |
... some more code |
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
# based in https://stackoverflow.com/a/43550457 | |
for produto in Produto.objects.filter(id__in=[produto['x'] for produto in Produto.objects.values('nome').distinct().annotate(x=Max('id'))]): | |
print("%d %s %d" % (produto.id, produto.nome, produto.valor)) |
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
[user] | |
name = Blah | |
email = Blah@Bleh | |
[alias] | |
co = checkout | |
ci = commit | |
st = status | |
br = branch | |
hist = log --pretty=format:'%h %ad | %s%d [%an]' --graph --date=short |
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
# Para CentOS | |
# firewall-cmd --zone=public --add-port=53/udp --permanent | |
# firewall-cmd --zone=public --add-port=8500/tcp --permanent | |
# firewall-cmd --zone=public --add-port=80/tcp --permanent | |
# firewall-cmd --zone=public --add-port=443/tcp --permanent | |
# firewall-cmd --reload | |
# Lembrando que há isolamento entre redes Docker, ler: | |
# https://docs.traefik.io/user-guide/docker-and-lets-encrypt/#networking |
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
Install Termux and SSHDroid ;) |
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
[url "https://github.com/"] | |
insteadOf = [email protected]/ | |
[url "https://github.com/"] | |
insteadOf = git://github.com/ |
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/sh | |
mkdir ~/down/ | |
cd ~/down/ | |
sudo apt-get install build-essential | |
wget http://www.python.org/ftp/python/2.7.2/Python-2.7.2.tgz | |
tar -xzf Python-2.7.2.tgz | |
cd Python-2.7.2 | |
sudo apt-get install libsqlite3-dev zlib1g-dev libncurses5-dev | |
sudo apt-get install libgdbm-dev libbz2-dev libreadline5-dev | |
sudo apt-get install libssl-dev libdb-dev |