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 | |
# | |
# Backs up all issues (open and closed) from a specified repository, together with their comments | |
# Uses GitHub API v3 and requires a valid API token | |
# | |
# Installation: | |
# python3 -m venv /path/to/virtualenv | |
# source /path/to/virtualenv/bin/activate | |
# pip install requests |
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 | |
# | |
# When triggered via a HTTP request, execute a command. | |
# | |
# Written by Senko Rasic <senko.rasic@goodcode.io> | |
# Released into Public Domain. Use it as you like. | |
# | |
# Usage: python trigger.py <host> <port> <key> <command>... | |
# | |
# HTTP GET and POST requests are supported. If you need more verbs or need |
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 | |
""" | |
Parse phone and email records out of vCard file and store them in a CSV. | |
Copyright (C) 2012 Senko Rasic <senko.rasic@dobarkod.hr> | |
Permission is hereby granted, free of charge, to any person obtaining a copy of | |
this software and associated documentation files (the "Software"), to deal in | |
the Software without restriction, including without limitation the rights to |
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
#!/bin/bash -e | |
# | |
# Easy VirtualBox VM handling from the command line | |
BASE_TEMPLATE="<uid-of-template-vm>" | |
function show_help() { | |
echo "Usage: $0 [cmd]" | |
echo "Valid commands:" | |
echo " list List available virtual machines" |
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
#!/bin/bash | |
# | |
# Initialize new virtual server using LXC and set up networking and HTTP proxy | |
# | |
# Written by: Deni Bertovic <deni.bertovic@dobarkod.hr> | |
# | |
# Released into Public Domain. You may use, modify and distribute it as you | |
# see fit. | |
# | |
# This script will: |
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 | |
# | |
# Written in 2013. by Senko Rasic <senko.rasic@dobarkod.hr> | |
# This code is Public Domain. You may use it as you like. | |
__all__ = ['updated'] | |
def updated(dct, *others): |
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
from gettext import translation | |
import os.path | |
from django.conf import settings | |
def get_all_translations(domain): | |
"""Return a language code => translations mapping for all defined | |
languages. This is useful if in a single view you need to use | |
different translation catalogs at the same time. |
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
from hashlib import sha1 | |
import unittest | |
__all__ = ['sign_structure'] | |
def sign_structure(data): | |
"""Create a (non-cryptographic) signature of the data structure. | |
This function makes sure that dict item ordering doesn't matter. |
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
#!/bin/bash | |
# | |
# screen-paste - Paste a screenshot to the Web (using pixbin.us service) | |
# | |
# Written by Senko Rasic <senko.rasic@goodcode.io> | |
# Released into Public Domain. Use it as you like. | |
# | |
# The tool allows the user to select a portion of the screen, then copies it | |
# to pixbin.us, and stores the resulting URL in clipboard. | |
# |
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
#!/bin/bash | |
# | |
# screen-paste - Paste a screenshot to the Web | |
# | |
# Written by Senko Rasic <senko.rasic@goodcode.io> | |
# Released into Public Domain. Use it as you like. | |
# | |
# The tool allows the user to select a portion of the screen, then copies it | |
# to S3, and stores the resulting URL in clipboard. | |
# |