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
<html> | |
<head> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> | |
</head> | |
<body> | |
<h1>Demo for displaying a loading image on button click</h1> | |
<div id="loading" style="display:none;"> | |
<center> |
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
# I wrote this program after several attempts to work with jenkinsapi and python-jenkins packages. | |
# This script got the job done without any issues. | |
import requests | |
import sys | |
jenkins_host = "localhost:8080" | |
jenkins_user = "admin" | |
jenkins_api = "z01c688ffc46511f7e8dd95014ggaf05" | |
# Check command line args |
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 sqlite3 as lite | |
import sys | |
conn = lite.connect('blog_posts.db') | |
# This will be called only the first time to create the table by running "python db_init_sqlite.py create" | |
def create_table(): | |
with conn: | |
cursor = conn.cursor() | |
cursor.execute("CREATE TABLE posts (date TEXT, title TEXT PRIMARY KEY, content 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
# Python imports | |
import requests | |
from requests import exceptions | |
import paramiko | |
import os | |
import time | |
# Note: Remember to add environment variable PASSWORD in bash_profile and source it. | |
# Local variables |