Skip to content

Instantly share code, notes, and snippets.

Avatar
😎
. . .

Radosław Frąckiewicz frodoslaw

😎
. . .
View GitHub Profile
@frodoslaw
frodoslaw / enable_sudo_debian.txt
Last active Dec 9, 2019
Enable "sudo" on Debian
View enable_sudo_debian.txt
1. Become 'su' on your account and Enter your password
2. apt-get install sudo
Debian 9 or older: add the user account to the group sudo with adduser username sudo. Where username is your user account.
Debian 10: add the user account to the group sudo with /sbin/adduser username sudo. Where username is your user account.
View k8s
https://portworx.com/run-ha-elasticsearch-elk-azure-kubernetes-service/
View jenkins-api.md

jobs

jenkins_url + /api/json?tree=jobs[name,color]

builds

jenkins_url + /job/${job_name}/api/json?tree=builds[number,status,timestamp,id,result]

last build

@frodoslaw
frodoslaw / update_wiki.py
Created Apr 25, 2019 — forked from martinezah/update_wiki.py
Snippet: Confluence page updates via API
View update_wiki.py
import json
import requests
BASE_URL = 'http://localhost/wiki/'
AUTH_USER = 'user'
AUTH_PASS = 'password123!'
POST_ID = 1234
def update_wiki():
@frodoslaw
frodoslaw / confluence_page_post.py
Created Apr 25, 2019 — forked from akiko-pusu/confluence_page_post.py
Confluenceのページをコピーして新しくページを作るサンプル
View confluence_page_post.py
import requests
import json
import os
import textwrap
from datetime import datetime
from datetime import timedelta
import re
class ConfluencePagePost:
'''Class to post page/blog content to Confluence via REST API.'''
@frodoslaw
frodoslaw / export-confluence-to-html.sh
Created Apr 25, 2019 — forked from kmccarth/export-confluence-to-html.sh
I needed to export our Confluence instance, here was a super easy way to get all pages, and create a file for each page (named after the article) and the page's resulting HTML.
View export-confluence-to-html.sh
#!/bin/bash
export CONFLUENCE_USERNAME="your_username"
export CONFLUENCE_PASSWORD="your_password"
function get_page_html()
{
mkdir ~/confluence;
result=$(curl --request GET \
--url "https://ventureapp.atlassian.net/wiki/rest/api/content/$1/?expand=body.export_view" \
--user $CONFLUENCE_USERNAME:$CONFLUENCE_PASSWORD \
View ticket_creation.py
#!/usr/bin/python
# -*- coding: utf-8 -*-
"""
Install: Execute 'pip install requests'
Run: 'python ticket_creation.py <YOUR_CONFIGURATION_FILE_HERE>'
Sample configuration file:
[server]
jira = https://jira.atlassian.net
@frodoslaw
frodoslaw / update_confluence.py
Created Apr 25, 2019 — forked from andymotta/update_confluence.py
Update/create a page containing a table w/ Confluence REST API
View update_confluence.py
#!/usr/bin/env python
'''
Update/create a page containing a table w/ Confluence REST API
'''
import requests
import json
# Get api credentials from local config file
@frodoslaw
frodoslaw / confluence-create-page.groovy
Created Apr 25, 2019
Create Confluence page - groovy
View confluence-create-page.groovy
package examples.docs
import com.atlassian.applinks.api.ApplicationLink
import com.atlassian.applinks.api.ApplicationLinkService
import com.atlassian.applinks.api.application.confluence.ConfluenceApplicationType
import com.atlassian.sal.api.component.ComponentLocator
import com.atlassian.sal.api.net.Request
import com.atlassian.sal.api.net.Response
import com.atlassian.sal.api.net.ResponseException
import com.atlassian.sal.api.net.ResponseHandler
@frodoslaw
frodoslaw / MicrosoftWindows10ProActivate.bat
Last active Mar 31, 2021
Microsoft Windows 10 Pro Activate
View MicrosoftWindows10ProActivate.bat
@echo off
title Windows 10 ALL version activator&cls&echo ************************************&echo Supported products:&echo - Windows 10 Home&echo - Windows 10 Professional&echo - Windows 10 Enterprise, Enterprise LTSB&echo - Windows 10 Education&echo.&echo.&echo ************************************ &echo Windows 10 activation...
cscript //nologo c:\windows\system32\slmgr.vbs /ipk TX9XD-98N7V-6WMQ6-BX7FG-H8Q99 >nul
cscript //nologo c:\windows\system32\slmgr.vbs /ipk 3KHY7-WNT83-DGQKR-F7HPR-844BM >nul
cscript //nologo c:\windows\system32\slmgr.vbs /ipk 7HNRX-D7KGG-3K4RQ-4WPJ4-YTDFH >nul
cscript //nologo c:\windows\system32\slmgr.vbs /ipk PVMJN-6DFY6-9CCP6-7BKTT-D3WVR >nul
cscript //nologo c:\windows\system32\slmgr.vbs /ipk W269N-WFGWX-YVC9B-4J6C9-T83GX >nul
cscript //nologo c:\windows\system32\slmgr.vbs /ipk MH37W-N47XK-V7XM9-C7227-GCQG9 >nul
cscript //nologo c:\windows\system32\slmgr.vbs /ipk NW6C2-QMPVW-D7KKK-3GKT6-VCFB2 >nul
cscript //nologo c:\windows\system32\slmgr.vbs /ipk 2WH4N-8QGBV-H22JP-CT43Q-MDWWJ