Skip to content

Instantly share code, notes, and snippets.

View Sulverus's full-sized avatar

Andrey Drozdov Sulverus

View GitHub Profile
@christopher-hopper
christopher-hopper / vm-resize-hard-disk.md
Last active April 5, 2022 10:30
Resize a Hard Disk for a Virtual Machine provisioned using Vagrant from a Linux base box to run using VirutalBox.

Resize a Hard Disk for a Virtual Machine

Our Virtual Machines are provisioned using Vagrant from a Linux base box to run using VirutalBox. If the Hard Disk space runs out and you cannot remove files to free-up space, you can resize the Hard Disk using some VirtualBox and Linux commands.

Some assumptions

The following steps assume you've got a set-up like mine, where:

@FZambia
FZambia / version_tag.sh
Last active December 18, 2015 02:39
creating tag with version for deploying purposes
function version_tag() {
# Script automatically increments revision in REVISION file.
# Creates tag and pushes it to git origin for deploy.
if [ ! -d .git ]; then
echo "not a git repo"
return
fi
if [ ! -f REVISION ]; then
# create REVISION file with zero version
@ser1zw
ser1zw / send-message.py
Last active January 17, 2018 18:09
Send E-mail from eml file in Python
#!/usr/bin/env python
# -*- mode: python; coding: utf-8 -*-
import sys
import os.path
import smtplib
if len(sys.argv) <= 2:
print('Usage:')
print(' $ python ' + sys.argv[0] + ' mailfrom rcptto <emlfile>')
print('')
@FZambia
FZambia / tastypie_template.py
Created December 10, 2012 13:54
Render tastypie data into template (initially for debugging with django-debug-toolbar)
def tastypie_template(template_name="base.html", var_name='data', serialize=True):
"""
Decorator.
Wrap Tastypie Resource class with it to render into template.
Usage:
@tastypie_template()
class UserResource(ModelResource):
...