Status | Function | API version | APIv3 name |
---|---|---|---|
[x] | authentication_check(...) |
APIv1 | general_proxy.auth_check |
[x] | get_build_details(...) |
APIv1 | build_proxy.get |
[x] | cancel_build(...) |
APIv1 | build_proxy.cancel |
[x] | delete_build(...) |
APIv1 | build_proxy.delete |
[x] | create_new_build(...) |
APIv1 | build_proxy.create_from_url build_proxy.create_from_urls build_proxy.create_from_file |
[x] | create_new_build_pypi(...) |
APIv1 | build_proxy.create_from_pypi |
[x] | create_new_build_tito(...) |
APIv1 | obsolete |
[x] | create_new_build_mock(..) |
APIv1 | obsolete |
Some of the code samples of Copr APIv3 based on https://pagure.io/copr/copr/issue/218
This document describes how the Copr projects for Foreman are created and how to build packages in them.
We've created two Copr projects.
- @theforeman/foreman-nightly - For all fedora packages and non-SCL epel packages
- @theforeman/tfm-foreman-nightly - For SCL packages
This file contains hidden or 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 fedmsg | |
import argparse | |
parser = argparse.ArgumentParser() | |
parser.add_argument('build_id', type=int) | |
parser.add_argument('pkg', type=int, help='See code of this script for possible indexes') | |
args = parser.parse_args() | |
pkgs = [None, |
This file contains hidden or 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/env python | |
import socket | |
import os | |
import sys | |
def listen_for_token(): | |
""" | |
Listens on port 13747 on localhost for a redirect request by OIDC | |
server, parses the response and returns the "access_token" value. | |
""" |
Run diskpart and then
Windows:
list disk
select disk <num>
clean
create partition primary
select partition 1
active
Welcome to my personal piece of hell.
This repository is collection of commonly (by me) used snippets which I need to search over and over again, due to compatibility issues between Python2 and Python3. I hope it will make me stop trying killing myself by hitting the wall with my head.
References:
This file contains hidden or 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 time | |
import subprocess | |
# s -- hh:mm:ss | |
def str_to_sec(s): | |
# http://stackoverflow.com/a/6402859/3285282 | |
l = s.split(':') |
This file contains hidden or 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 psutil | |
import re | |
paths = ['/usr/bin', '/usr/sbin', '/usr/lib', '/lib'] | |
combined = "(" + ")|(".join(paths) + ")" | |
processes = [] | |
for pid in psutil.get_pid_list(): |
This file contains hidden or 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
<?php | |
class FacebookDebugger | |
{ | |
/* | |
* https://developers.facebook.com/docs/opengraph/using-objects | |
* | |
* Updating Objects | |
* | |
* When an action is published, or a Like button pointing to the object clicked, | |
* Facebook will 'scrape' the HTML page of the object and read the meta tags. |
NewerOlder