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
{% block body %} | |
<body> | |
<center> | |
{% for line in result %} | |
{{ line }} | |
{% endfor %} | |
</center> | |
</body> | |
{% endblock %} |
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/python | |
import requests | |
from bs4 import BeautifulSoup | |
requests.packages.urllib3.disable_warnings() | |
urls = [ | |
'http://marshyski.com/', | |
'http://marshyski.com/man-behind-the-keyboard/', |
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
from fabric.api import sudo, env, put | |
import configuration as config | |
import socket, time | |
env.hosts = open('hosts_file', 'r').readline().rstrip() | |
env.user = config.USERNAME | |
env.port = '22' | |
env.key_filename = config.KEY_FILE | |
env.warn_only = True |
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 grails.plugins.rest.client.RestBuilder | |
import grails.transaction.Transactional | |
import sun.misc.BASE64Encoder | |
@Transactional | |
class JenkinsService { | |
def grailsApplication | |
def createJob(String folderName) { | |
String url = grailsApplication.config.jenkins.url |
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
curl -XPOST 'http://<xld-server>:<xld-port>/deployit/repository/ci/Applications/<ci>' --user 'some_username:some_password' -H "Content-type:application/xml" -d '<core.Directory id="Applications/ci"/>' |
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
# List repo sources | |
choco sources list | |
# Setup local server | |
choco sources add -name local -source http://fqdn | |
choco sources disable chocolately | |
# Install package | |
choco install 7zip | |
choco install 7zip -source http://fqdn |
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
# Delete all docker images | |
for x in `docker images | grep -v REPO | awk '{ print $3 }'`; do docker rmi $x; done | |
# Delete all docker containers | |
for x in `docker ps -a | grep -v CONTAINER | awk '{ print $1 }'`; do docker rm -f $x; done | |
# Start all docker containers | |
for x in `docker ps -a | grep -v CONTAINER | awk '{ print $1 }'`; do docker start $x; done | |
# Fresh docker env in Redhat flavors |
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 configuration as config | |
from subprocess import call | |
import requests | |
import time, socket | |
''' Turn off SSL errors ''' | |
requests.packages.urllib3.disable_warnings() | |
''' Wait for port 443 is listening ''' | |
while True: |
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 | |
env && echo | |
runlevel && echo | |
hostname -f && echo | |
cat /etc/hosts && echo |