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/env python | |
# -*- coding: utf-8 -*- | |
# [email protected] / @glennzw | |
# Handle wireless networking from Python | |
# The name (evil.py) is a play on 'wicd' | |
from subprocess import Popen, call, PIPE | |
import errno | |
from types import * | |
import logging | |
import sys |
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 csv | |
from django.http import HttpResponse | |
def export_as_csv_action(description="Export selected objects as CSV file", fields=None, exclude=None, header=True): | |
""" | |
This function returns an export csv action | |
'fields' and 'exclude' work like in django ModelForm | |
'header' is whether or not to output the column names as the first row | |
""" | |
def export_as_csv(modeladmin, request, queryset): |
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/env bash | |
# Documentation | |
# https://docs.gitlab.com/ce/api/projects.html#list-projects | |
NAMESPACE="YOUR_NAMESPACE" | |
BASE_PATH="https://gitlab.example.com/" | |
PROJECT_SEARCH_PARAM="" | |
PROJECT_SELECTION="select(.namespace.name == \"$NAMESPACE\")" | |
PROJECT_PROJECTION="{ "path": .path, "git": .ssh_url_to_repo }" |
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
name: Deploy | |
on: | |
push: | |
branches: | |
- production | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest |