Skip to content

Instantly share code, notes, and snippets.

View rikoz's full-sized avatar

Rikome E. rikoz

View GitHub Profile
@rikoz
rikoz / deploy.yml
Created August 16, 2022 11:21 — forked from LeCoupa/deploy.yml
Github Action Deploy Script For Nuxt.js
name: Deploy
on:
push:
branches:
- production
jobs:
deploy:
runs-on: ubuntu-latest
@rikoz
rikoz / sync-projects
Created May 25, 2021 17:21 — forked from JonasGroeger/sync-projects
Gitlab: Clone / Pull all projects in a group
#!/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 }"
@rikoz
rikoz / actions.py
Created September 29, 2020 09:56 — forked from jeremyjbowers/actions.py
Export to CSV for Django admin
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):
@rikoz
rikoz / evil.py
Created September 17, 2017 16:58 — forked from glennzw/evil.py
Simple Python library to manage wireless network connection.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# glenn@sensepost.com / @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